Forum Moderators: open
To add salt on the wound, we have been testing all week in Firefox (like idiots), and decided to live with the poor speed for a few weeks and then overhaul the hardware after doing some other tweeks.
But then we started testing in IE. And the site is remarkably slower(2-3 seconds). Infact it's so slow in IE that we will not be able to launch it as scheduled.
I am wondering why it's so slow in IE.
I'm also looking for a quick fix for IE that will bring it somewhere near FF.
Ps. the pages are CSS & PHP on Linux & Apache
Since you are using FireFox, there is a "Developers Extension" you can install that offers a speed report -- it may give you some more ideas.
You definitely need to profile your system. Some thoughts:
As tedster said, database queries can be a serious weak point. You should be opening a connection to the database only once per page. Look carefully at your queries to make sure that you're using indexes appropriately, and that you aren't joining massive amounts of data unnecessarily.
I'd also suggest looking over your table-locking routines if the site accepts much user data, but in this case it sounds as if it isn't user load that's the problem.
Add time-monitoring code to your scripts so you can tell which parts of the page are taking longest to generate. Obviously, bracket the database calls, but do cover the rest of the script as well.
You can get an HTTP headers extension for Firefox. This should give you some idea about the data flowing back and forth between browser and server. Are your caching indications set correctly, or is the browser repeatedly fetching data that hasn't changed? You can probably get much of this information for IE from the Apache logs.
So, by any chance is this page script-heavy?
Still don't understand why IE is taking 2-3 seconds longer to load "first byte in browser"
If I understand it correctly you think that it is during page generation server-side that there might be a problem? Have you tried the Live HTTP headers extension in Firefox to record the headers for a pageview? Also, just to confirm are you using any heavy client-side stuff? Are you feeding different CSS to IE via conditional comments? No .htc files or similar? Are you running Norton Internet Security or similar transparent proxy/adblocking program on your IE test machines, and if you are and you turn it off, does it make a difference?
[howtocreate.co.uk...]
- Firefox avoids database trips for content it already has. Example, on a shopping site, with several pages for the same products, when you click page 2, only the additional products are fetched anew. All the balance data (including database data) on the page will remain constant.
- On clicking page 2, IE will keep non-database objects constant, but will fetch all database date anew
How does one implement browser side "query cache" in IE?