Support

Home Forums Event Espresso Premium Event List Extremely Slow (EE3)

Event List Extremely Slow (EE3)

Posted: November 21, 2014 at 11:11 am


sheathe

November 21, 2014 at 11:11 am

I’ve been using EE3 for a couple years and have over 800 events and over 20,000 attendees. There are currently 61 active events.

I have several categories of events and am finding both the [EVENT_LIST] and [EVENT_CUSTOM_VIEW] shortcodes both take over 5 seconds to run on the server before returning html to the browser.

When I run it locally on my dev site using MAMP PRO, it still takes over 4 seconds.

Can you recommend anything to improve the speed?


Josh

  • Support Staff

November 21, 2014 at 3:51 pm

Hi Scott,

You should be able to cache those pages since they’re mostly static content, unless you’re showing how many tickets are left for each event. If you go the caching route, please be sure to disable caching for the main registration page as well as the payment pages.

Along with that, if you view the source of the page, it will have a little html comment near the footer that says how many queries x how much time it took to do the query. You might also be able to reduce the number of queries as well be removing pars of the query that you aren’t using. For example if you aren’t displaying venue info, you can remove any joins on the venue tables.


sheathe

November 21, 2014 at 6:55 pm

Thanks Josh,
Hmmm – I’m not sure if caching is the best solution since new events are always being added and dropping off.

However, your suggestion about removing the unneeded joins resulted in a decrease from over 5 seconds to 0.5 seconds. Makes me wonder if the database has a problem, or is not optimized or something.

In case anyone is interested, here are the before and after queries:

Default Query (inside plugins/custom-templates/index.php):

SELECT e.*, ese.start_time, ese.end_time, p.event_cost , v.name venue_name, v.address venue_address, v.city venue_city, v.state venue_state, v.zip venue_zip, v.country venue_country, v.meta venue_meta, v.id venue_id FROM wp_events_detail e LEFT JOIN wp_events_start_end ese ON ese.event_id = e.id LEFT JOIN wp_events_prices p ON p.event_id=e.id LEFT JOIN wp_events_venue_rel vr ON vr.event_id = e.id LEFT JOIN wp_events_venue v ON v.id = vr.venue_id WHERE e.is_active = 'Y' AND (e.start_date >= '2014-11-21' OR e.event_status = 'O' OR e.registration_end >= '2014-11-21') AND e.event_status != 'D' AND e.event_status != 'S' GROUP BY e.id ORDER BY date(e.start_date), ese.start_time ASC

Simplified Query (0.581 seconds including other queries on the page):

SELECT e.id, e.event_name, e.start_date, v.name venue_name FROM wp_events_detail e LEFT JOIN wp_events_venue_rel vr ON vr.event_id = e.id LEFT JOIN wp_events_venue v ON v.id = vr.venue_id WHERE e.is_active = 'Y' AND (e.start_date >= '2014-11-21' OR e.event_status = 'O' OR e.registration_end >= '2014-11-21') AND e.event_status != 'D' AND e.event_status != 'S' GROUP BY e.id ORDER BY date(e.start_date) ASC

Thanks,
Scott


Dean

November 26, 2014 at 1:04 am

Thanks for sharing!

The support post ‘Event List Extremely Slow (EE3)’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Dean 4 years, 7 months ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!