{"id":1282599,"date":"2017-05-11T15:00:49","date_gmt":"2017-05-11T22:00:49","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-admin-page-loading-insanely-slow\/"},"modified":"2017-05-16T19:30:06","modified_gmt":"2017-05-17T02:30:06","slug":"events-admin-page-loading-insanely-slow","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-admin-page-loading-insanely-slow\/","title":{"rendered":"Events admin page loading insanely slow"},"content":{"rendered":"<p>I was having a 30 second to 2 minute loading time on the events admin page (wp-admin\/edit.php?post_type=tribe_events)<\/p>\n<p>Using Query monitor there was 165 slow queries, 138 of them were all the same function from your ticket event-tickets-plus addon: Tribe__Tickets_Plus__Commerce__WooCommerce__Main-&gt;get_orders_by_status<br \/>\nhttps:\/\/docs.google.com\/spreadsheets\/d\/1umAIIExEN655lA_2k6O-rnWi9_5f_sF1juuSnlqNBug\/edit?usp=sharing<\/p>\n<p>I am only displaying 20 events per page, it seems like this function runs on ALL events regardless of the admin page you are on?<\/p>\n<p>I have attached a screenshot of my event counts, 199 total events is not a lot. Also I used your plugins to clear recurring events, I have none on the site now.<\/p>\n<p>If I go to your deceptive old function it loads much much faster with no errors.<br \/>\nI switched the below line:<br \/>\n<code> $incomplete_orders = version_compare( '2.2', WooCommerce::instance()-&gt;version, '&lt;=' ) ?<br \/>\n$this-&gt;get_orders_by_status( $ticket_id, $status ) : $this-&gt;backcompat_get_orders_by_status( $ticket_id, $status );<br \/>\n<\/code><br \/>\nTo this:<br \/>\n<code>$incomplete_orders = $this-&gt;backcompat_get_orders_by_status( $ticket_id, $status );<\/code><br \/>\nObviously editing the plugin is not good, but the function was killing the events.<\/p>\n<p>Another 23 slow queries are these:<br \/>\n<code>Tribe__Tickets_Plus__Commerce__WooCommerce__Orders__Cancelled-&gt;real_get_count<\/code><\/p>\n<p>Finally these two functions are taking over 2 second each:<br \/>\nTribe__Tickets__Cache__Abstract_Cache-&gt;fetch_posts_with_ticket_types<br \/>\nTime: 2.8285<br \/>\nTribe__Tickets__Cache__Abstract_Cache-&gt;fetch_posts_with_ticket_types<br \/>\ntime: 2.4797<\/p>\n<p>The above two functions taking that long for 199 events and on a page only displaying 20events in the admin seems insane.<\/p>\n","protected":false},"template":"","class_list":["post-1282599","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>Events admin page loading insanely slow -<\/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\/events-admin-page-loading-insanely-slow\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Events admin page loading insanely slow -\" \/>\n<meta property=\"og:description\" content=\"I was having a 30 second to 2 minute loading time on the events admin page (wp-admin\/edit.php?post_type=tribe_events) Using Query monitor there was 165 slow queries, 138 of them were all the same function from your ticket event-tickets-plus addon: Tribe__Tickets_Plus__Commerce__WooCommerce__Main-&gt;get_orders_by_status https:\/\/docs.google.com\/spreadsheets\/d\/1umAIIExEN655lA_2k6O-rnWi9_5f_sF1juuSnlqNBug\/edit?usp=sharing I am only displaying 20 events per page, it seems like this function runs on [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-admin-page-loading-insanely-slow\/\" \/>\n<meta property=\"article:modified_time\" content=\"2017-05-17T02:30:06+00:00\" \/>\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=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-admin-page-loading-insanely-slow\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-admin-page-loading-insanely-slow\/\",\"name\":\"Events admin page loading insanely slow -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-05-11T22:00:49+00:00\",\"dateModified\":\"2017-05-17T02:30:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-admin-page-loading-insanely-slow\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-admin-page-loading-insanely-slow\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-admin-page-loading-insanely-slow\/#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\":\"Ticket Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Event Tickets Plus\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Events admin page loading insanely slow\"}]},{\"@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":"Events admin page loading insanely slow -","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\/events-admin-page-loading-insanely-slow\/","og_locale":"en_US","og_type":"article","og_title":"Events admin page loading insanely slow -","og_description":"I was having a 30 second to 2 minute loading time on the events admin page (wp-admin\/edit.php?post_type=tribe_events) Using Query monitor there was 165 slow queries, 138 of them were all the same function from your ticket event-tickets-plus addon: Tribe__Tickets_Plus__Commerce__WooCommerce__Main-&gt;get_orders_by_status https:\/\/docs.google.com\/spreadsheets\/d\/1umAIIExEN655lA_2k6O-rnWi9_5f_sF1juuSnlqNBug\/edit?usp=sharing I am only displaying 20 events per page, it seems like this function runs on [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-admin-page-loading-insanely-slow\/","article_modified_time":"2017-05-17T02:30:06+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-admin-page-loading-insanely-slow\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-admin-page-loading-insanely-slow\/","name":"Events admin page loading insanely slow -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-05-11T22:00:49+00:00","dateModified":"2017-05-17T02:30:06+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-admin-page-loading-insanely-slow\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-admin-page-loading-insanely-slow\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-admin-page-loading-insanely-slow\/#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":"Ticket Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/"},{"@type":"ListItem","position":4,"name":"Event Tickets Plus","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/"},{"@type":"ListItem","position":5,"name":"Events admin page loading insanely slow"}]},{"@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\/1282599","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":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1282599\/revisions"}],"predecessor-version":[{"id":1282892,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1282599\/revisions\/1282892"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1282599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}