Performance Tweak For Ajax Views

Permalink Browser Info Environment
On one of the sites we're currently working on which makes quite heavy use of the calendar the ajax requests were taking a while to load. I looked into the relevant views and I think there is an easy win that can be quickly implemented in the main loop.

In proevents/views/ajax/pro_event_list/calendar_responsive.php:186 it looks like the data for the event object is being loaded regardless of whether or not the event is relevant to the current iteration.

Moving
if ($date == $daynum) {
      $events_item = $day_num;
}
$date = $date_array['date'];
if ($events_item == $day_num) {

up above the $event_obj instantiation seems to make a huge difference on sites with quite a number of events.

Is there any chance something like this can be included in an upcoming update?

Thanks!

Type: Discussion
Status: In Progress
triplei
View Replies:
RadiantWeb replied on at Permalink Reply
RadiantWeb
Hi there,

This is an auto responder to let you know that your support ticket has been forwarded to our entire support team at RadiantWeb!

Support tickets are reviewed Mondays thru Fridays 9am to 9pm & Saturdays 9am to 12pm EST.

A support team member will be following up with you as soon as possible.

Thank for supporting RadiantWeb Products!

RadiantWeb Support
http://goradiantweb.com

concrete5 Environment Information

# concrete5 Version
Core Version - 5.7.5.8
Version Installed - 5.7.5.8
Database Version - 20160412000000

# concrete5 Packages
Background Image (0.1.0), Basic Accordion (1.0.0), Fileset plus (1.0.0), Nested Content (2.0.5), ProEvents (2.8.4).

# concrete5 Overrides
blocks/content/templates/event_post/view.css, blocks/content/templates/event_post/view.php, blocks/content/templates/event_post, blocks/content/templates, blocks/content, blocks/button/edit.php, blocks/button/_form.php, blocks/button/view.php, blocks/button/controller.php, blocks/button/db.xml, blocks/button/add.php, blocks/button, blocks/autonav/templates/footer.php, blocks/autonav/templates, blocks/autonav, blocks/resource/form.php, blocks/resource/edit.php, blocks/resource/view.css, blocks/resource/view.less, blocks/resource/view.php, blocks/resource/controller.php, blocks/resource/db.xml, blocks/resource/add.php, blocks/resource, blocks/image/js/hover.js, blocks/image/js, blocks/image/view.php, blocks/image/templates/circle.php, blocks/image/templates, blocks/image, blocks/event_location/view.css, blocks/event_location/view.php, blocks/event_location/controller.php, blocks/event_location, blocks/search/view.php, blocks/search/templates/footer.php, blocks/search/templates, blocks/search, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/nb_NO/LC_MESSAGES/messages.mo, languages/nb_NO/LC_MESSAGES, languages/nb_NO, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/pl_PL/LC_MESSAGES/messages.mo, languages/pl_PL/LC_MESSAGES, languages/pl_PL, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/es_PY/LC_MESSAGES/messages.mo, languages/es_PY/LC_MESSAGES, languages/es_PY, languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, themes/ccrr/right_sidebar.php, themes/ccrr/description.txt, themes/ccrr/js/respond.js, themes/ccrr/js/modernizr.js, themes/ccrr/js/scripts.js, themes/ccrr/js/ie.rem.js, themes/ccrr/js, themes/ccrr/page_theme.php, themes/ccrr/default.php, themes/ccrr/js_src/ccrr.js, themes/ccrr/js_src, themes/ccrr/home.php, themes/ccrr/view.php, themes/ccrr/css/bootstrap.css, themes/ccrr/css/presets/defaults.less, themes/ccrr/css/presets, themes/ccrr/css/ie.less, themes/ccrr/css/build/page_specific.less, themes/ccrr/css/build/mixins.less, themes/ccrr/css/build/navigation.less, themes/ccrr/css/build/page-type-specific.less, themes/ccrr/css/build/bootstrap.less, themes/ccrr/css/build/media_queries.less, themes/ccrr/css/build/styles.less, themes/ccrr/css/build/blocks/forms.less, themes/ccrr/css/build/blocks/button.less, themes/ccrr/css/build/blocks/search.less, themes/ccrr/css/build/blocks/basic-accordions.less, themes/ccrr/css/build/blocks, themes/ccrr/css/build/footer.less, themes/ccrr/css/build/fonts/glyphicons-halflings-regular.eot, themes/ccrr/css/build/fonts/glyphicons-halflings-regular.woff2, themes/ccrr/css/build/fonts/glyphicons-halflings-regular.svg, themes/ccrr/css/build/fonts/glyphicons-halflings-regular.ttf, themes/ccrr/css/build/fonts/defaults.less, themes/ccrr/css/build/fonts/glyphicons-halflings-regular.woff, themes/ccrr/css/build/fonts, themes/ccrr/css/build/bootstrap-variables.less, themes/ccrr/css/build/elements.less, themes/ccrr/css/build, themes/ccrr/css/styles.xml, themes/ccrr/css/bootstrap.min.css, themes/ccrr/css/main.less, themes/ccrr/css, themes/ccrr/elements/footer.php, themes/ccrr/elements/header.php, themes/ccrr/elements/header_top.php, themes/ccrr/elements/main_areas.php, themes/ccrr/elements, themes/ccrr, blocks/content/templates/event_post/view.css, blocks/content/templates/event_post/view.php, blocks/content/templates/event_post, blocks/content/templates, blocks/content, blocks/button/edit.php, blocks/button/_form.php, blocks/button/view.php, blocks/button/controller.php, blocks/button/db.xml, blocks/button/add.php, blocks/button, blocks/autonav/templates/footer.php, blocks/autonav/templates, blocks/autonav, blocks/resource/form.php, blocks/resource/edit.php, blocks/resource/view.css, blocks/resource/view.less, blocks/resource/view.php, blocks/resource/controller.php, blocks/resource/db.xml, blocks/resource/add.php, blocks/resource, blocks/image/js/hover.js, blocks/image/js, blocks/image/view.php, blocks/image/templates/circle.php, blocks/image/templates, blocks/image, blocks/event_location/view.css, blocks/event_location/view.php, blocks/event_location/controller.php, blocks/event_location, blocks/search/view.php, blocks/search/templates/footer.php, blocks/search/templates, blocks/search, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/nb_NO/LC_MESSAGES/messages.mo, languages/nb_NO/LC_MESSAGES, languages/nb_NO, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/pl_PL/LC_MESSAGES/messages.mo, languages/pl_PL/LC_MESSAGES, languages/pl_PL, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/es_PY/LC_MESSAGES/messages.mo, languages/es_PY/LC_MESSAGES, languages/es_PY, languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, themes/ccrr/right_sidebar.php, themes/ccrr/description.txt, themes/ccrr/js/respond.js, themes/ccrr/js/modernizr.js, themes/ccrr/js/scripts.js, themes/ccrr/js/ie.rem.js, themes/ccrr/js, themes/ccrr/page_theme.php, themes/ccrr/default.php, themes/ccrr/js_src/ccrr.js, themes/ccrr/js_src, themes/ccrr/home.php, themes/ccrr/view.php, themes/ccrr/css/bootstrap.css, themes/ccrr/css/presets/defaults.less, themes/ccrr/css/presets, themes/ccrr/css/ie.less, themes/ccrr/css/build/page_specific.less, themes/ccrr/css/build/mixins.less, themes/ccrr/css/build/navigation.less, themes/ccrr/css/build/page-type-specific.less, themes/ccrr/css/build/bootstrap.less, themes/ccrr/css/build/media_queries.less, themes/ccrr/css/build/styles.less, themes/ccrr/css/build/blocks/forms.less, themes/ccrr/css/build/blocks/button.less, themes/ccrr/css/build/blocks/search.less, themes/ccrr/css/build/blocks/basic-accordions.less, themes/ccrr/css/build/blocks, themes/ccrr/css/build/footer.less, themes/ccrr/css/build/fonts/glyphicons-halflings-regular.eot, themes/ccrr/css/build/fonts/glyphicons-halflings-regular.woff2, themes/ccrr/css/build/fonts/glyphicons-halflings-regular.svg, themes/ccrr/css/build/fonts/glyphicons-halflings-regular.ttf, themes/ccrr/css/build/fonts/defaults.less, themes/ccrr/css/build/fonts/glyphicons-halflings-regular.woff, themes/ccrr/css/build/fonts, themes/ccrr/css/build/bootstrap-variables.less, themes/ccrr/css/build/elements.less, themes/ccrr/css/build, themes/ccrr/css/styles.xml, themes/ccrr/css/bootstrap.min.css, themes/ccrr/css/main.less, themes/ccrr/css, themes/ccrr/elements/footer.php, themes/ccrr/elements/header.php, themes/ccrr/elements/header_top.php, themes/ccrr/elements/main_areas.php, themes/ccrr/elements, themes/ccrr

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache/2.4.7

# Server API
cgi-fcgi

# PHP Version
5.5.9-1ubuntu4.17

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imagick, json, libxml, mbstring, mhash, mysql, mysqli, openssl, pcntl, pcre, PDO, pdo_mysql, Phar, posix, readline, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, ssh2, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, Zend OPcache, zip, zlib.

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 38M
sql.safe_mode - Off
upload_max_filesize - 32M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
opcache.max_accelerated_files - 2000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.