First off, I love Modx. It’s been a joy to work with. I built a portfolio website with Revolution 2.0. The site has a lot of large images, with the homepage weighing in at about 600K (not outrageous by today’s standards).
Problem is that on initial page load, it regularly takes 7-8 seconds for anything to appear. There’s no progressive loading, everything just appears at once. Anyone have any ideas of why the site is so slow to render? Running the same website files outside of Modx is pretty zippy.
I’m running:
Revolution 2.0
MySQL 4.1 (Media Temple grid hosting)
PHP5
thanks!
-
MODX Staff
- 10,725 Posts
Unless you have your own database container, I have found the response time of the database requests on the MT Grid service to be absolutely horrible. But it all depends on what Snippets etc. you are executing on your page( s ). You can also improve performance on the MT Grid service by enabling the cache_database system setting; this turns on result set caching from the database and greatly reduces the need for MODx to even access the database server.
Thanks for the tip, I’ll give that a shot. Pretty much the only snippet I’m running is getResources so I feel like it’s probably the grid service.
It seems that the culprit may be the getResources snippet. We have removed the snippet and loaded tested the site and it seems to load significantly faster (minus give or take 350k of images that are not showing up after removing the snippet)
In your description in the download page you state that "getResources is NOT a replacement for Ditto, but rather an alternative component that can accomplish some of the things that the more specialized components do." With that being said, do you recommend we explore other components that serve the same functions, but are compatible with Revo? If so which one? Our other option could be to figure out why that particular snippet is causing such long load times and how to remedy the issue.
Any thoughts?
Caching is turned on. We’re not sorting by a TV. There are approximately 10 getResources calls on the page and they’re fetching about 40 resources in total. The results are mostly images with some title and summary text.
I ran the executioner snippet (very helpful!) and all the getResources calls totaled up to approximately 2.5 seconds. Average page load time is 7-8 seconds so I’m truly stumped as to where the hang up is.
OpenGeek, thanks for all your help so far.
Once the calls are cached, everything on the site operates at normal speed. The main problem is the initial load of the homepage (which seems as though it’s hanging on something and then suddenly appears after 8 seconds). As a test, I took all the raw HTML and placed it in a new modx template with no getResources calls and the page loads in less than 2 seconds. The only other snippet on the page is SPForm (which I kept in the raw HTML template test).
I actually want to correct something from my previous reply. Some of the resources are being displayed by a Template Variable. I created a TV to the tune of "Feature This Item", and if checked, those resources are shown on the homepage. Is displaying resources by a TV a problem?