Being quite weary of slow exec times I am always searching for the holy grail of NULL waiting time.
What is your average execution time for your modx site's average page? (not taking caching into account)
I know we can use getCache or memcache or other means to alleviate server processing times, however in some cases the website in question needs to read from external databases, doing loop-de-loops all over the place etc. Another requirement is to always display up-to-date info from the database rather than cache.
What do you deem as acceptable in terms of exec speed? I've had sites which took 2-3 secs to render per page, had sites which did it in under a second (all live data). Im currently working on a modx revo project and I am trying to keep the average unached page render at about 1.5secs.
Would you deem this as acceptable or too slow?
-
MODX Staff
- 10,725 Posts
You have to optimize by using caching. PHP is a dynamic language and if you want to work with databases and summarizing other pages from the CMS, etc. you need to be able to cache those things if you want your site to scale. If you have a site or even just Resources in your site where everything has to be non-cacheable, it will never scale, period.
That said, I always shoot for < 1s on the initial uncached load for any Resource. If it takes longer, even proper caching will not help when the number of requests per second get high enough and/or you want to be able to frequently update the site.
I am sure I will turn to caching sooner or later, however I was interested in an average ballpark figure for uncached pages.
My thinking is if I can make the site run reasonably fast with EVERYTHING uncached, it will run much much faster once caching is employed.
One niggle/question when it comes to caching - lets say you have 10,000 (landing) pages on your site, and each page is cached. Lets say that pages take ~5 secs to process uncached, and that cache refreshes every day.
This would mean that all pages cached today will have to be processed again tommorow on each virgin (first) hit. That means a user which is arriving onto a page which hasnt been cached for that day, will still have to wait for those 5 seconds until the page is parsed and a cached version is saved.
Caching benefit is lost here for every virgin hit. If I think about this in my head, and visualise visitors arriving to the site for each day hitting different pages, I see a problem, as those uncached hits could account anywhere up to 50% of the traffic.
How does one deal with this? Some pre-cacher of some kind, which will spider/hit all of those 10,000 pages each morning to prepare the first cached version?