Country Filter in Filter Bar possibly still borked

Home Forums Calendar Products Filter Bar Country Filter in Filter Bar possibly still borked

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1186466
    Damion
    Participant

    Per Nico’s guidance, I am pointing back to the original thread where this started, specifically regarding the possibility of internal support:

    https://theeventscalendar.com/support/forums/topic/filter-bar-activated-okay-but-actual-event-content-in-main-views-disappear/#post-1179480

    Do you have a copy of the site in your local computer or just the live site? It would be interesting to see if you can reproduce this in more than one server to discard some config or resource limitation issues.

    Comparing the city, state and country filters, I see there’s some extra code in the country one there are some operations to find the country name / code. I’m mostly sure that part of the code is the one making the load time lot slower.

    We took the site out of staging and into where it will be hosted live. It is at Liquid Web on a VPS with 512MB of a possible 1GB of memory behind it.

    Now, instead of just stopping in the process of rendering the page, it produces the page after 20-30s. And the filter works *amazingly* once it does load.

    Here’s the SQL dump: https://drive.google.com/file/d/0BwzKIIobBLSaaUhGM3B0ckxKaWs/view?usp=sharing (should be public).

    You guys still have an account you can use, but the domain name hasn’t been moved over yet, so the only way to access it is editing the hosts file and pointing to the numerical IP.

    There are 6000+ events, so I understand that it’s not necessarily going to be blazing fast, but is the addition of looking up country codes that much different from all the other evaluations?

    Since there are very few international events, proportionate to the whole, is there any way to maybe generate a whitelist for reference? Like, maybe I make a CRON that looks up which events have non-US locations each day, and point the filter bar to only return those? (Not asking for coding help, just wondering if such a customization is possible given the framework you guys have developed…a conceptual question)

    It’s become more important to my fearless leader that we make sure the Country filter actually works at the same zippiness and non-visitor-dissuading load times as the other filters. I can appreciate that there’s a lot for it to comb through, and that it’s at a different scale than perhaps this was designed for…and that adding double the power has helped the issue along considerably. But short of going full-crank on the RAM on the hosting, is there any way to optimize the situation as-is to maybe meet it part of the way there?

    #1187296
    Nico
    Member

    Hi Damion,

    Thanks for getting in touch and sorry to hear this wasn’t solved by a more powerful infrastructure 🙁

    Anyway I already logged this bug (or improvement) before I closed the other thread in which I helped you on this. For now the fix for this hasn’t been slated to any upcoming release, but let me re-try mounting the db dump and see if I can make any tweaks to improve the performance and make it acceptable for now. Give me some time as I surely won’t make time to review this today and it might take a bit of work to find a work around (if possible).

    If you are able to the following test for me, it would be great → Simple install WP Super Cache (or a similar cache plugin) on the site and activate it with default settings. Does it improve loading speed of events pages with filter bar considerably?

    Please let me know about it,
    Best,
    Nico

    #1188740
    Damion
    Participant

    I installed WP Super Cache.

    It seems to help once you’ve viewed the page a time or two. But there’s still the all important first impression even with it on, that can dictate bounce rates for newcomers, where it doesn’t want to load for 20-30s.

    Some victory is better than no victory!

    It says because this is a “faked” setup and the real, existing old site at mudrunfun.com shows different pages that they scraped versus the test one we edited our host files to access, we get this message:

    Unfortunately, WordPress cannot find the file wp-cron.php. This script is required for the correct operation of garbage collection by this plugin, WordPress scheduled posts as well as other critical activities.

    but presumably that changes after we go live. Since it works so well after the first load, I imagine the impact is low to this specific use case.

    Thanks as always for chiming in so quickly and with so much to offer.

    #1188904
    Nico
    Member

    Thanks for the kind words Damion and glad to hear this helps a bit! I still got to inspect this and try to find a temporary workaround until devs get to this ticket.

    Also, I’m not sure about the error you mentioned. It might be due to the fact that the site is a staging site access by editing the host file, as you say.

    Give me a bit of time, I’ll try to get to this tomorrow if possible!

    Best,
    Nico

    #1189856
    Damion
    Participant

    Oh, yeah, that was actually an error from the cacheing plug-in, not ECP. And I wouldn’t expect support on that. Just sharing, and keeping you in the loop as far as what I was experiencing to provide context =)

    #1191197
    Nico
    Member

    Hey Damion,

    Sorry to say I couldn’t jump into this yet 🙁 I need a bit of time for testing test possible solutions and make sure it doesn’t break how the plugin works. Additionally I have to do this with your data to make sure it’s performs well. So just hang in there a bit more!

    Thanks for the patience, have a great weekend,
    Cheers,
    Nico

    #1191497
    Damion
    Participant

    Take however much time you need. I’m just thrilled that you’re being nice enough to go out of your way to explore and assist.

    I was thinking tonight, if I did make a patch, maybe I could do something much simpler than a whitelist. The functionality to filter events is predicated, pretty much, on people wanting to know about stuff coming up.

    There are a LOT of past events. Who really cares to filter for which country they’re in?

    Point being, if I could wrap the country code check in another conditional (assuming that’s still where the anti-magic is happening), it could be on the order of a few hundred events to scrape instead of a few thousand.

    #1194094
    Nico
    Member

    Thanks for the patience here Damion! And for the further suggestions as well.

    I could run some more tests on this and apparently the part of the code slowing down everything is the one trying to match country codes with their names. When I comment out that part of the code I see things running pretty smoothly (almost at the same speed you get when disabling the Country filter).

    I need to say this a bit above my technical chops, I can see some loops in there that multiplied by the amount of countries in the site could be the cause of this slowdown. Anyway I’m not sure at all how can that part of the code could be refactored. This said let me escalate this to a more technically proficient member of the team and I’ll get back to you as soon as I have something to share!

    Thanks once again for being a great customer 🙂
    Best,
    Nico

    #1196176
    Nico
    Member

    Hey Damion,

    Brook (support/dev) is taking a look at the issue and suggested for now that you copy/paste this entire list into WP Admin > Events > Settings > Default Content > Use a custom list of countries. Apparently this should speed up things for now!

    Please give this a try and let me know,
    Best,
    Nico

    #1198596
    Damion
    Participant

    That is a neat trick! I’ve never seen that setting before.

    It didn’t help with reproducing the whole list, at least not in any noticeable way.

    I shortened it to just the half dozen locations we actually use, and that got it down to 9 or 10 seconds, but without the filter at all it’s still 3-5, on average.

    Very thankful for the progress.

    Hope you had a good Thanksgiving!

    #1199047
    Nico
    Member

    Thanks for the feedback Damion! Glad to hear it helped a bit for now.

    Hopefully the finds Brook made while investigating this will allow the bug to be fixed soon.

    Best,
    Nico

    #1359265
    Victor
    Keymaster

    Hello Damion!

    I’ve just notified you on your other thread, but posting again here just in case you missed it.

    I wanted to share with you that a new maintenance release (for the Week of 2 October 2017) is out, including a fix for the country filter performance issue ?

    Find out more about this release → https://theeventscalendar.com/maintenance-release-week-2-october-2017/

    Please update the plugins and let us know if the fix works for your site.

    Best,
    Victor

    #1369346
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Country Filter in Filter Bar possibly still borked’ is closed to new replies.