Location switcher slow response time – need assistance

This topic contains 23 replies, has 3 voices, and was last updated by  Paolo 7 years, 4 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #327832

    Benjamin Schmitz
    Expired Member
    Post count: 59

    Hi,

    Two other things came up that we would like to have fixed/improved. It’s taking quite a lot of time for a location switcher to open up a location page when switching through Regions. For example, jump from Alabama to Arizona takes more than 10 seconds.. Can you please see what’s going on?

    Second thing, I did as you guys advise me to create a custom page, set it as homepage and use a beaver builder to create a custom homepage. Now, that part works. But what I can’t figure out right now is how to show current location on Locations page (which uses the same widgets as homepage). I tried to add shortcode to the top content area but it doesn’t work. On the other hand, I can’t add it to the page content neither as it’s all widgets.

    So how to display current location to the user? Any php trick maybe?

    #327917

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    please provide a link and admin credentials and we will have a look.

    Thanks

    #328001

    Benjamin Schmitz
    Expired Member
    Post count: 59
    This reply has been marked as private.
    #328396

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    it looks like sometimes it is failing to load the footer scripts. I asked to the developers to verify.

    Thanks

    #328405

    Benjamin Schmitz
    Expired Member
    Post count: 59

    Thank you, I appreciate it. Please keep me updated. Thanks

    #328412

    Benjamin Schmitz
    Expired Member
    Post count: 59
    This reply has been marked as private.
    #328436

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Ben,

    I don’t seem to have problems with it just now but Paolo said he seen it very slow.
    Can you confirm what your hosting specs are like (a link to your hosting package would be best)
    Also the cpanel details dont seem to work, can you check those.

    Thanks,

    Stiofan

    #328525

    Benjamin Schmitz
    Expired Member
    Post count: 59
    This reply has been marked as private.
    #329297

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I restricted the home map to only show one cat on first load, also i rebooted the server as there seemed to be some stuck mysql proccesses, can u check it now.

    Thanks,

    Stiofan

    #329397

    Benjamin Schmitz
    Expired Member
    Post count: 59
    This reply has been marked as private.
    #329401

    Benjamin Schmitz
    Expired Member
    Post count: 59
    This reply has been marked as private.
    #329408

    Benjamin Schmitz
    Expired Member
    Post count: 59
    This reply has been marked as private.
    #329409

    Benjamin Schmitz
    Expired Member
    Post count: 59
    This reply has been marked as private.
    #329617

    Benjamin Schmitz
    Expired Member
    Post count: 59

    A few more things on SQL queries – There are a few slow queries on each action regarding search and locations. For example, the query for switching location

    
    
    SELECT SQL_CALC_FOUND_ROWS PREFIXposts.*, PREFIXgeodir_gd_place_detail.*
    FROM PREFIXposts 
    INNER JOIN PREFIXgeodir_gd_place_detail
    ON (PREFIXgeodir_gd_place_detail.post_id = PREFIXposts.ID) 
    WHERE 1=1 
    AND ( PREFIXposts.post_status = 'publish' 
    OR PREFIXposts.post_status = 'private' )
    AND PREFIXposts.post_type = 'gd_place'
    AND post_locations LIKE '%,[california],%' 
    GROUP BY PREFIXposts.ID 
    ORDER BY PREFIXposts.post_date DESC, PREFIXposts.post_title ASC 
    LIMIT 0, 5

    which takes 0.6747sec to be executed and it’s considered slow. Could it be due to a usage LIKE query? Just for fun, I changed the query and used FULLTEXT search on this query and the query took 0.0002sec with the same results. That’s XXX times faster.

    LIKE with wildcarding on the left side (IE: LIKE ‘%Search’) can not use an index (assuming one exists for the column), guaranteeing a table scan. LIKE ‘%Search’ and LIKE ‘%Search%’ can not use an index; LIKE ‘Search%’ can use an index as far as I know.

    For location switcher, regions and cities are strictly defined values, right? Maybe I’m wrong about this, but why use LIKE if we know where and what to look for? Hope that makes some sort of sense..

    For the advanced search.. The database get’s clogged just by typing in the search term. Disabling autocompleter definitely have an impact on performance in good a good way, but as I said above, ‘%Search%’ will always guarantee a full table scan, while ‘Search%’ can use an index.

    But still, the fact that the query takes forever with autocompleter enabled, indicates there’s something wrong with it..

    Thoughts?

    #329740

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Please give it a try now.

    I added made some small changes to the code but the main changes are i have set the popular post widget to only show featured listings, it can really be anything but it needs to somehow filter the listings by something otherwise it’s querying all 200k listings and then applying the filtering on them just to get maybe 5 listings.

    It is hard to list 200k markers on a map, we spent alot of time on the queries so you can but the final stage of caching the queries is not implemented fully which would make this much faster and allow you to show more selected cats on load.

    GD Booster seemed to be having problems so i moved you to wpsuper cache and autoptimize, you don’t see the full benefit of these until you are browsing the site logged out, you will need to disable maintenance to test.

    Thanks,

    Stiofan

Viewing 15 posts - 1 through 15 (of 24 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket