{"id":1170612,"date":"2016-09-29T11:08:32","date_gmt":"2016-09-29T18:08:32","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/slow-event-edit-page-with-large-number-of-organizers-and-venues\/"},"modified":"2016-09-29T11:08:32","modified_gmt":"2016-09-29T18:08:32","slug":"slow-event-edit-page-with-large-number-of-organizers-and-venues","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/slow-event-edit-page-with-large-number-of-organizers-and-venues\/","title":{"rendered":"Slow Event Edit Page with Large Number of Organizers and Venues"},"content":{"rendered":"<p>Our website has large amounts of data, 12k+ events, 5k+ organizers and 14k+ venues. We believe that because of the amount of data and the way you have programmed certain aspects of your plugin we are experiencing extremely long load times, specifically on the edit event page. On that page, one of your methods in your plugin is loading all 5k+ organizers and 14k+ venues into two dropdowns on the page.<\/p>\n<p>Through various methods of testing, including looking at NewRelic data for specific functions that are taking a long time to process and by incrementally eliminating data from our database and running performance tests in the browser, we have narrowed down this issue to one feature \/ function in your plugin: <code>Linked_Posts::saved_linked_post_dropdown()<\/code>. This method <code>echo<\/code>s two &lt;select&gt; lists with &lt;options&gt; for all the 19k+ organizers and venues in our database. Because of the large amount of data, this seems to take 40-50s in our current case (just for this task). You can see in the attached image that by incrementally deleting data from our database that load times improve. I even tried directly modifying the plugin to just echo an empty &lt;select&gt; list at the very top of the function (and return immediately after) to bypass the rest of the processing (which resulted in the fastest load times).<\/p>\n<p>As a potential fix to this problem, I think that moving the loading of this data to AJAX and only loading it in chucks or based on the query being typed in (similar to what we are doing on our front end: http:\/\/g.recordit.co\/Z61RjaDK4u.gif which can be tested here: https:\/\/hikeitbaby.com\/find-a-hike\/submit-a-hike\/add) would greatly improve the performance of this page. You would then only want to echo a single item or two into the select lists from the method mentioned previously, just the one that is currently selected&#8230;<\/p>\n<p>I see that other customers have encountered this and similar issues: https:\/\/theeventscalendar.com\/support\/forums\/topic\/query-is-too-long-for-organizers-info-and-venue-info-methods\/<br \/>\nbut your suggestions to turn off the WPE_GOVERNOR only help with the actual execution of long queries and do not address the actual performance issues of loading tens of thousands of entries onto a page&#8230; Do you have any plans to address these types of concerns so that your plugin is more scalable and won&#8217;t impact the performance of the rest of the site?<\/p>\n<p>We sometimes have multiple volunteers working on reviewing and approving our publicly submitted event data and when they are all online trying to edit and publish events (&#8220;hikes&#8221; in our case) and the edit page they are trying to use takes 50-60+s for every load, it not only takes them a lot of time and is frustrating, but also causes our site to slow down, the result of which is 502 errors caused by WP Engine killing off various processes (on the front and back end). 90% of the time, the location and\/or organizer doesn&#8217;t even change, so the fact that data is being loaded every time is completely unnecessary and only needs to be available when someone clicks on that dropdown. And even then, they will be searching for a specific venue which could be queried for over AJAX.<\/p>\n","protected":false},"template":"","class_list":["post-1170612","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Slow Event Edit Page with Large Number of Organizers and Venues -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/slow-event-edit-page-with-large-number-of-organizers-and-venues\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Slow Event Edit Page with Large Number of Organizers and Venues -\" \/>\n<meta property=\"og:description\" content=\"Our website has large amounts of data, 12k+ events, 5k+ organizers and 14k+ venues. We believe that because of the amount of data and the way you have programmed certain aspects of your plugin we are experiencing extremely long load times, specifically on the edit event page. On that page, one of your methods in [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/slow-event-edit-page-with-large-number-of-organizers-and-venues\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/slow-event-edit-page-with-large-number-of-organizers-and-venues\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/slow-event-edit-page-with-large-number-of-organizers-and-venues\/\",\"name\":\"Slow Event Edit Page with Large Number of Organizers and Venues -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-09-29T18:08:32+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/slow-event-edit-page-with-large-number-of-organizers-and-venues\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/slow-event-edit-page-with-large-number-of-organizers-and-venues\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/slow-event-edit-page-with-large-number-of-organizers-and-venues\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Slow Event Edit Page with Large Number of Organizers and Venues\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Slow Event Edit Page with Large Number of Organizers and Venues -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/slow-event-edit-page-with-large-number-of-organizers-and-venues\/","og_locale":"en_US","og_type":"article","og_title":"Slow Event Edit Page with Large Number of Organizers and Venues -","og_description":"Our website has large amounts of data, 12k+ events, 5k+ organizers and 14k+ venues. We believe that because of the amount of data and the way you have programmed certain aspects of your plugin we are experiencing extremely long load times, specifically on the edit event page. On that page, one of your methods in [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/slow-event-edit-page-with-large-number-of-organizers-and-venues\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/slow-event-edit-page-with-large-number-of-organizers-and-venues\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/slow-event-edit-page-with-large-number-of-organizers-and-venues\/","name":"Slow Event Edit Page with Large Number of Organizers and Venues -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-09-29T18:08:32+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/slow-event-edit-page-with-large-number-of-organizers-and-venues\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/slow-event-edit-page-with-large-number-of-organizers-and-venues\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/slow-event-edit-page-with-large-number-of-organizers-and-venues\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Slow Event Edit Page with Large Number of Organizers and Venues"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1170612","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1170612\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1170612"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}