Re: Laying on of hands
> And no one had thought to look at the server performance stats before then?
Once upon a time, there was a web-based system provided by a major telecomms company, to a major financial company, which had little offices dotted around the world, each of which was hooked into this system via relatively slow wired connections.
And there were a lot of complaints about the performance of said system.
I wasn't actually involved in that project in a technical role, but one day, when looking at something, I fired up the browser devtools, and realised two things
First, the pages often included drop-downs which had hundreds if not thousands of options in them. And these lists of options were generally built from templates which included a lot of whitespace - to the tune of hundreds of extra characters per option. And this whitespace was invisible because when rendered as HTML, the browser just ignored them.
However, all this extra whitespace massively bulked out the size of the page - often from a few hundred kilobytes to several megabytes.
Secondly, the web servers didn't have any compression options turned on. Which meant that these megabytes of spurious whitespace were choking up the relatively low-bandwidth connections.
So, in the first instance, turning on mod_compress (or whatever the equivalent was at the time), shrunk the amount of data being transferred by about 85%, even with the whitespace still being in situ.
And then, stripping the whitespace from the templates reduced amount of data being delivered, further reducing the data-transfer sizes and reducing the amount of CPU and memory being consumed by the browser.
As such, we went from dealing with 5+mb per page-load to ~30kb of data being transferred, which then decompressed to about 150kb within the browser. Which may not have fixed all of the performance issues, but did make a significant difference!
However, if I hadn't stumbled over this by accident, the issue would have persisted for a lot longer!