Location switcher slow response time – need assistance
This topic contains 23 replies, has 3 voices, and was last updated by Paolo 7 years, 11 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: location switcher
-
AuthorPosts
-
December 20, 2016 at 5:21 pm #327832
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?
December 20, 2016 at 6:45 pm #327917Hi,
please provide a link and admin credentials and we will have a look.
Thanks
December 20, 2016 at 10:20 pm #328001This reply has been marked as private.December 21, 2016 at 4:30 pm #328396Hi,
it looks like sometimes it is failing to load the footer scripts. I asked to the developers to verify.
Thanks
December 21, 2016 at 4:40 pm #328405Thank you, I appreciate it. Please keep me updated. Thanks
December 21, 2016 at 4:52 pm #328412This reply has been marked as private.December 21, 2016 at 6:35 pm #328436Hi 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
December 21, 2016 at 9:45 pm #328525This reply has been marked as private.December 22, 2016 at 5:57 pm #329297I 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
December 22, 2016 at 9:45 pm #329397This reply has been marked as private.December 22, 2016 at 9:52 pm #329401This reply has been marked as private.December 22, 2016 at 10:05 pm #329408This reply has been marked as private.December 22, 2016 at 10:08 pm #329409This reply has been marked as private.December 23, 2016 at 9:18 am #329617A 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?
December 23, 2016 at 4:16 pm #329740Please 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
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket