{"id":17398,"date":"2012-03-30T07:43:13","date_gmt":"2012-03-30T14:43:13","guid":{"rendered":"http:\/\/tri.be\/support\/forums\/topic\/grid-view-takes-8-seconds-to-load-everything-else-less-than-a-second\/"},"modified":"2015-07-07T06:20:06","modified_gmt":"2015-07-07T13:20:06","slug":"grid-view-takes-8-seconds-to-load-everything-else-less-than-a-second","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grid-view-takes-8-seconds-to-load-everything-else-less-than-a-second\/","title":{"rendered":"grid view takes ~8 seconds to load, everything else less than a second"},"content":{"rendered":"<p>I am noticing a slow-down with the grid view of my ECP Pro (2.0.4) installation.<\/p>\n<p>I understand that there is a confirmed AJAX speed issue, but in this instance I am talking about direct page loads from URL and not navigating via AJAX (although that is slow too).<\/p>\n<p>It takes about 8 seconds to load grid view.  I measured this using the Net panel in FireBug, and I can see that it is not a js or other file causing the problem. I also changed the theme to Twentyeleven to remove any theme-related influences.<\/p>\n<p>The slow-down seems to have gradually gotten worse over time, which makes me think it might be query-related (as the number of events on the calendar increase).  There are 1,700 events on the calendar, and a month may have as many as 50 events. I did compare the time it took to load grid view with a month full of events vs a month with no events&#8211; they both load equally slow.<\/p>\n<p>I monitored the queries to the database, and I can see that a query like this runs for every day of the month:<br \/>\n<code><br \/>\nSELECT wp_3_posts.*, eventStart.meta_value as EventStartDate, IFNULL(DATE_ADD(CAST(eventStart.meta_value AS DATETIME), INTERVAL eventDuration.meta_value SECOND), eventEnd.meta_value) as EventEndDate  FROM wp_3_posts  LEFT JOIN wp_3_postmeta as eventStart ON( wp_3_posts.ID = eventStart.post_id AND eventStart.meta_key = '_EventStartDate')  LEFT JOIN wp_3_postmeta as eventDuration ON( wp_3_posts.ID = eventDuration.post_id AND eventDuration.meta_key = '_EventDuration')  LEFT JOIN wp_3_postmeta as eventEnd ON( wp_3_posts.ID = eventEnd.post_id AND eventEnd.meta_key = '_EventEndDate')  WHERE 1=1  AND wp_3_posts.post_type = 'tribe_events' AND (wp_3_posts.post_status = 'publish') AND ((eventStart.meta_value &gt;= '2012-03-03 00:00:00' AND eventStart.meta_value = '2012-03-03 00:00:00' AND eventStart.meta_value &lt;= &#039;2012-03-03 23:59:59&#039; ) OR (eventStart.meta_value = '2012-03-03 23:59:59' ))  ORDER BY DATE(eventStart.meta_value) ASC, TIME(eventStart.meta_value) ASC LIMIT 0, 10<br \/>\n<\/code><\/p>\n<p>It takes about 200-300 MS to run this query directly on the database server, multiplying that by 30 days in a month might explain the 8 second load times.<\/p>\n<p>I am running WordPress on Server 2008 with IIS\/PHP\/FastCGI.  Another server is running Server 2008 with MySQL installed.  There are other applications running on the web server that are using the same database server as WordPress.  The other WordPress plugins, pages, and entire other applications are functioning fast&#8211; despite large\/complicated queries.<\/p>\n<p>Could this be an issue of query optimization?  I can&#8217;t imagine how slow things could get with 5,000 or more events in the database.  Is there anything I can do to help remedy this situation?<\/p>\n<p>I have really enjoyed using the plugin so far, thanks for your hard work<\/p>\n","protected":false},"template":"","class_list":["post-17398","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>grid view takes ~8 seconds to load, everything else less than a second -<\/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\/grid-view-takes-8-seconds-to-load-everything-else-less-than-a-second\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"grid view takes ~8 seconds to load, everything else less than a second -\" \/>\n<meta property=\"og:description\" content=\"I am noticing a slow-down with the grid view of my ECP Pro (2.0.4) installation. I understand that there is a confirmed AJAX speed issue, but in this instance I am talking about direct page loads from URL and not navigating via AJAX (although that is slow too). It takes about 8 seconds to load [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grid-view-takes-8-seconds-to-load-everything-else-less-than-a-second\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-07-07T13:20: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=\"2 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\/grid-view-takes-8-seconds-to-load-everything-else-less-than-a-second\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grid-view-takes-8-seconds-to-load-everything-else-less-than-a-second\/\",\"name\":\"grid view takes ~8 seconds to load, everything else less than a second -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2012-03-30T14:43:13+00:00\",\"dateModified\":\"2015-07-07T13:20:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grid-view-takes-8-seconds-to-load-everything-else-less-than-a-second\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grid-view-takes-8-seconds-to-load-everything-else-less-than-a-second\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grid-view-takes-8-seconds-to-load-everything-else-less-than-a-second\/#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\":\"grid view takes ~8 seconds to load, everything else less than a second\"}]},{\"@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":"grid view takes ~8 seconds to load, everything else less than a second -","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\/grid-view-takes-8-seconds-to-load-everything-else-less-than-a-second\/","og_locale":"en_US","og_type":"article","og_title":"grid view takes ~8 seconds to load, everything else less than a second -","og_description":"I am noticing a slow-down with the grid view of my ECP Pro (2.0.4) installation. I understand that there is a confirmed AJAX speed issue, but in this instance I am talking about direct page loads from URL and not navigating via AJAX (although that is slow too). It takes about 8 seconds to load [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grid-view-takes-8-seconds-to-load-everything-else-less-than-a-second\/","article_modified_time":"2015-07-07T13:20:06+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grid-view-takes-8-seconds-to-load-everything-else-less-than-a-second\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grid-view-takes-8-seconds-to-load-everything-else-less-than-a-second\/","name":"grid view takes ~8 seconds to load, everything else less than a second -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2012-03-30T14:43:13+00:00","dateModified":"2015-07-07T13:20:06+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grid-view-takes-8-seconds-to-load-everything-else-less-than-a-second\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/grid-view-takes-8-seconds-to-load-everything-else-less-than-a-second\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grid-view-takes-8-seconds-to-load-everything-else-less-than-a-second\/#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":"grid view takes ~8 seconds to load, everything else less than a second"}]},{"@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\/17398","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\/17398\/revisions"}],"predecessor-version":[{"id":976857,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/17398\/revisions\/976857"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=17398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}