6

Why would the MB size on Begin Template Processing be so much different on a site hosted locally to that same site being put on a live server?

And does that have any relevance to page speed?

An example I have set up with just RAW data and minimal HTML shows these results:

Locally

TEMPLATE DEBUGGING
(0.000006 / 1.90MB) Begin Template Processing
(0.000246 / 1.92MB) URI: news
(0.000260 / 1.92MB) Path.php Template:
…

And then On a Dreamhost Server:

(0.000024 / 7.75MB) - Begin Template Processing -
(0.001825 / 7.81MB) URI: news
(0.001866 / 7.81MB) Path.php Template: /
(0.001904 / 7.81MB) Retrieving Template
4

I asked a similar question on Stack Overflow about High Memory Usage in ExpressionEngine Templates.

The smaller MB size on Begin Template Processing in attributed to APC bytecode caching being enabled on the server.

| improve this answer | |
  • And is there any config setting that can be applied, either to the cofig.php or htaccess, that enables said cacheing? – since1976 Dec 18 '12 at 22:55
  • Forget the above comment I see that it has to be setup by the hosting provider. – since1976 Dec 18 '12 at 22:58
  • 1
    /facepalm. Thanks for this. I had APC running but totally forgot to check the configs for it after doing server upgrades. Turns out it wasn't properly configured anymore. – notacouch Apr 10 '14 at 18:04
5

If you are using MAMP or similar locally/dev setup it likely has apc enabled for byte code caching, and the production server does not, as Mediagirl pointed out.

Likewise there could be other things related to that, php as mod_php vs. not on the production server, different php versions and different php modules enabled, vs. not, and so on.

Also if you are like many, your local/development setup maybe a local SSD drive in a laptop vs. a network based storage system, or similar differences in local vs. production server setups. In the example above that last line you showed for the production server execution of 1.9 thousandths of a second, while that is slower than the 2 ten thousandth of a second for local/dev, I am not sure I would see that part is the defining portion of the "slowness" on the production server either.

| improve this answer | |
  • Nevin you were right as well, it was a switchee tag (my fault completely) that was causing the slowness on the production server and not the server itself. – since1976 Dec 19 '12 at 0:00
0

In my experience, the performance is always better in production than dev. Seeing as you have the opposite, to me, it would look like your live server has some serious issues in terms of configuration. Serious, serious, issues. You might want to contact your host and ask them to look into things.

| improve this answer | |
  • Thanks Eric I will get in touch with them. Just one more thing are the MBs referenced there the Memory usage or a physical file size of some sort? – since1976 Dec 18 '12 at 21:12
  • It's memory (RAM) usage – Eric Lamb Dec 18 '12 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.