|determining page size of dynamic pages?|
help with page size determination
I've got a couple WordPress sites that I've been optimizing with themes and plugins. I'm hosted on a fast server with low CPU loads. I have a couple static websites on this server that perform fine: Click an internal link, and the resulting page refresh is fast. But my WordPress sites (two different sites using mostly the same plugins but different themes) have page load time problems. Some times they'll load in a second or two. Other times you may have to wait five or ten seconds to get a page! (I am using the WP-Cache plugin, so this shouldn't be a server issue for page generation.)
1) I was thinking that page size may be an issue, but WordPress does a dynamic page generation. I don't know how to find out what that size is. Can anyone assist?
2) Any other thoughts or experience as to why my pages are loading slow, or help with troubleshooting?
|...but WordPress does a dynamic page generation. I don't know how to find out what that size is. Can anyone assist? |
If you only want/need to find the size of a few pages, a default install of the Opera browser might help as it has a 'progress bar', which you can position via Tools \ Appearance \ Toolbars \ Progress Bar
It shows Document Size, Image Count, and 'Download Speed'
Note: this info disappears once the page is fully downloaded... and would probably be easier to read on a slow dial-up connection
I have a WP site that is zippy as all git-go (I'm not allowed to link to it here). The difference came when I switched ISPs. I have a friend who's site generated bigger pages than mine, yet loaded three times as fast.
I got a VPS on his ISP, and it has sped up my WP quite a bit. Maybe it's the Apache install.
Administering the site is still slow, but nowhere near as slow as it was. WP is a big fat pig; especially if you use a few plugins. Some people throw every plugin they can find into their installs. Each plugin costs you.
I haven't had much luck with WP-Cahce in my install. I have several pages that actually get screwed over by the caching, and I couldn't easily except them. I don't use it, and the site is really zippy.
Here's what I do:
1) I use a decent ISP with a fast LAMP.
2) I only use the plugins that I ABSOLUTELY NEED.
3) I put code into my header.php or pluging wp-head handler that prevents loads of things like the Google Maps API (REALLY SLOW) unless the page in question needs it.
4) I "scrub" my output, scripts and styles with a "cleaner" that strips out cruft like comments (in CSS and JS), multiple spaces and indents.
5) I use the "ob_" functions [us2.php.net] to deliver compressed content.
It makes it quite bearable for me.
...but WordPress does a dynamic page generation. I don't know how to find out what that size is. Can anyone assist?
A previous user (lavazza), suggested the Opera progress bar. Have you tried Firefox? Look for "page info" at the bottom of the menu produced when you right-click anywhere on a page. There's quite a lot under the "General" tab and I think the "Size" feature is about right - although I can't guarantee it. The values seem close to what I'd expect for my WordPress sites as previously my site used static pages.
As an example, this page in the forum (as I type) shows as 10.09 kB (10,332 bytes)
The answer is PHP's ob_ (output buffer) functions [us2.php.net]. These allow you to trap the entire page output and do what you will with it.
I use these all the time to optimize my output.
In my troubleshooting this problem, I found these utilities:
Web Page Analyzer:
It's a plugin for FireFox. Allows you to watch pages load in real-time, and allows you to view code in real time as well. Gives readouts for KB loaded, and the time it takes to load every aspect of the page. Perfect for what I needed.
And for those interested, I did eventually find the problem: It was partially the graphics on my pages - I had a bunch of JPGs that weren't compressed very well. I redid the compression on all my graphics and cut my page load times almost half.
The other part of the problem was that my site was on an underpowered server - as my site grew in popularity (2000+ uniques per day or so), it would also get spidered, often my multiple spiders at once. During those times, the dynamic page generation would kill the memory on the server and cause a slowdown. My host moved me to a heftier server.
Problems are solved.
Thanks for the help, everyone!
web developer 1.1.4 will give the size of the html and each of the images, css, js, etc and the total size of all the pieces/parts...
welcome to WebmasterWorld [webmasterworld.com], mdr23!