views:

55

answers:

4

I want to check the performance of the gzip decoding speed in a web browser. In the Java or c#, we can easily check the gzip decoding time. But I can not measure the decoding time in the web browser.

plz help me. I want to check some decoding speed of gzipped html files. With JavaScript can I measure the performance.

+1  A: 

I don't think there's a way to get that time, especially in your own Javascript code : I suppose the decompression is done at a much lower-level (like somewhere arround the download/network layer of the browser) than the rendering of the page the execution of your Javascript code.

That would be the best solution for that compression to be totally transparent for the upper-layers : when rendering pages or executing JS code, there is absolutely no need for the browser to know that it's been received in a compressed form.


Maybe a solution, especially with Firefox, would be to develop some extension ?

Considering Firebug, for example, is able to kind of "hook" into the network layer, to display the information we get in the "Network" tab, I suppose you might be able to do sort of the same ?

Pascal MARTIN
+1  A: 

In open source browsers like Chromium or Firefox you could have a look at the source code and insert some lines to record the time needed for decoding. If the browser uses a specific library for gzip decoding, you can of course also download that library and test it.

eWolf
A: 

In Google Chrome, you can check out the various properties of chrome.loadTimes().

Eli Grey
A: 

You can do it using Fiddler - it has a time display for each HTTP transaction. Because Fiddler is a debugging proxy, it works with any browser. Windows only, though.

Cheeso