Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Optimization of final HTML code
#2
What's the reason for that?

Believe me, whatever feeling you may have that it will improve things don't hold against any performance test.

Even the fastest text parser on earth is not able to remove enough chars from it to a point that it will be faster to parse/optimize/transmit than increasing your compression ratio in ServerController.Compression.Level setting.

One example:

I ran a random IW project which is open now on my IDE. Size of the HTML:

Original: 3316
Optimized (using online HTML minifier): 2718
Gain = 18%

Now, I gzipped both using maximum compression:
Original: 1,456 (1,466 using fastest)
Optimized: 1,324 (1,329 using fastest)

The difference is now only 9%. Also notice that using fastest compression I get almost exactly the same result. Have in mind that fastest compression, especially in x64 uses extra-optimized Cloudflare gzip compression which is the fastest available in the (Delphi) world.

The difference tends to be smaller when the file size increases (~ 5-7%). Whatever performance gain you may think you will have with, say, 10% of reduction of the traffic will be
pulverized by the CPU cycles spent by the parser/optimizer.
Reply


Messages In This Thread
Optimization of final HTML code - by TPiotr - 04-21-2020, 08:09 PM
RE: Optimization of final HTML code - by Alexandre Machado - 04-24-2020, 04:56 AM
RE: Optimization of final HTML code - by TPiotr - 04-24-2020, 10:01 AM
RE: Optimization of final HTML code - by TPiotr - 04-25-2020, 07:46 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)