A badly configured JEvents installation with a large database of events can lead to slow response times on your server and excessive traffic due to search engine activity.
This article summarises the settings you can employ to improve the performance of your site and also improve your search engine crawling too. They are all important points i.e. point 8 is just as important as point 1.
1. Joomla Caching
Unless you have a particular reason not to enable Joomla caching you should do so in the overall Joomla config. This means that Joomla will be able to deliver a cached copy of frequently visited pages to non-logged in visitors on your site.
2. JEvents Caching
Again unless you have a particular reason not to enable JEvents caching you should do so in the JEvents config - on the component tab. This enables JEvents to cache the requsts of complex database queries and analysis and deliver your commonly viewed JEvents pages faster.
3. Reduce Uncessary Search Engine Crawler Visits
JEvents generates hundreds of dynamically generated pages for daily views. Event Weekly views, monthly views etc. generate many distinct links since the date part of the URL can vary. If they are not discouraged search engine crawlers are likely to wander around your site looking at hundreds of day lists (with no events) and different views of the same data.
3.1 Set meta-tag to restrict robots
In the configuration you can set a value for the "Set meta-tag to stop robots crawlers". If you say "No" here then you are allowing robots to visit every single JEvents generated link on your site. You should set one of the other values
Yes : This sets the robots meta tag to "noindex, nofollow" for all JEvents pages on your site. Your events details will therefore probably not appear in a search engine's index.
Conditional On Calendar Date : This sets the robots meta tag to "noindex, nofollow" for all JEvents pages on your site outside the date range secified in the following two fields ("Block Robots before this date" and "Block Robots after this date").
: (RECOMMENDED) This sets the robots meta tag to "noindex, nofollow" for all JEvents pages on your site apart from event detail pages (which are the pages you probably want to index in any case). This raises the obvious question - how do the search engine reach these pages if they can't follow links to get to them? See 3.2 for the answer.
3.2 Create a Crawler list menu item
In JEvents you can create a layout of event links that is specially designed for search engine robots/cralwers. You should create a JEvents menu item of type "Search Engine Crawler View". You can choose a range of date for the events to listand whether or not to list all repeats.
If you use a Site map application you can add this menu item to a "hidden" menu, i.e. a menu that isn't shown in a module, then add this menu/link to the site map config. Then make sure you submit your site map to your search engine and set the update rates options there.
The net result is that the cralwers/robots will go straight to the event detail pages and should not follow or index other JEvent pages.
3.3 Set a crawl-delay in your robots.txt file
Make sure you include a crawl delay entry in your robots.txt file. e.g.
Crawl-delay: 20
In your robots.txt file - this will tell well behaved search engines to crawl with a delay of at least 20 seconds between each visit. You can set this at different levels for different robots. Note that for Google you should login to the google site administrator tools and set the crawl rate there.
4. Set a reasonable range of dates for the calendar
If you are note interested in events before 2009 or after 2013 (and realistically who is) then set the "First Year to Display in Calendar" to 2009 and "Last Year to Display in Calendar" to 2013. This will mean that JEvents won't create links for dates outside this range (good protection against cralwers/robots that don't respect the robots meta tags.
5. Reduce Excessively Repeating Events
Some event authors may enter an excessive of repeats for their events - e.g. a radio station may setup daily repeats for a show and enter an "until date" 20 years in the future or setup 99999 repeats. The schedule is not fixed for 20 years and there will not be 99999 daily shows. This is not a cosmetic problem - JEvents will generate a lot of database entries to represent these repeats and the database will quickly become quite large and monthly view pages quite slow to load. The answer is easy - limit the repeats to sensible dates or repeat counts.
There is a utility script available in the bronze download area that can be used periodically to check for 'rogue' entries. See http://www.jevents.net/en/downloads/category/57-performance-analysis
6. Hide the navigation bar if you don't need it.
If you have a very large number of events (perhaps you are a newspaper website listing community events) then the monthly view can become impractical to view and very slow to load. In this case you may only want the daily view - in which case create a menu type to go to the daily list view and switch off the navigation bar in the JEvents config (Use new Icon Navigation bar).
In the future I will look at adding options to remove specific icons.
7. Disable event checking in calendar module
By default the calendar module checks if there are events falling on all the dates in the calendar - when you have a LOT of events then this can eat up memory and processing time unnecessarily (since there is probably an event on each day in any case). In this case you should disable the checking for events on each day in the module parameters.
8. Configure JEvents addons carefully
- If you don't need to display custom field information in list views then disable this option in the config.
- If you have no private or hidden detail events then disable these options in the user specific events plugin
- If you are using RSVP Pro DO NOT enable "Make attendee count available in list views" or "Make attendees available in list views" unless you really want these features. They use a lot of processing effort especially on a site with a many events.
9. Block badly behaved/irrelevant spiders/crawlers
I recently had a problem with the JEvents.net website with a distributed spider/crawler (80legs) that was hammering the site so hard that it could have been classified as a DOS attack. This caused the site to die and all URLs were reporting 500 errors.
Additionally some spiders crawl websites too aggressively increasing server load unecessarily.
Block the offending spiders in your .htaccess file with something like this
RewriteCond %{HTTP_USER_AGENT} baidu [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Sogou [OR]
RewriteCond %{HTTP_USER_AGENT} 80legs [OR]
RewriteCond %{HTTP_USER_AGENT} Inktomi
RewriteRule ^.* - [F,L]
10. Use mod deflate and set expires time on static content
Some Joomla templates and system plugins compress javascript in an attempt to speed up the delivery of your webpages. Unfortunately these methods can cause javascript errors by loading scripts in the incorrect order or cause errors in one script to block the execution of other scripts. It is recommended that you disable these for sites running JEvents.
A better method is to use the webserver's own compression capabilities and use the webbrowser's own cache where possible. You can do this by adding this to the bottom of your .htaccess file on your server - if you get a 500 webserver error after adding these settings its possible your server doesn't support mod_deflate or mod_expires so you should remove this from your .htaccess.
# Compress output
AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript application/javascript text/javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
ExpiresActive On
ExpiresByType image/png "access plus 7 days"
ExpiresByType image/jpeg "access plus 7 days"
ExpiresByType image/gif "access plus 7 days"
ExpiresByType image/x-icon "access plus 12 days"
ExpiresByType application/x-shockwave-flash "access plus 12 days"
ExpiresByType avideo/mp4 "access plus 12 days"
ExpiresByType text/css "access plus 12 hours"
ExpiresByType text/javascript "access plus 12 hours"
ExpiresByType application/javascript "access plus 12 hours"
ExpiresByType application/x-javascript "access plus 12 hours"