apache / incubator-pagespeed-mod

Apache module for rewriting web pages to reduce latency and bandwidth.
http://modpagespeed.com
Apache License 2.0
697 stars 159 forks source link

Negative css_filter_total_bytes_saved #698

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Loaded filters: 
ah,ij,cw,cc,gp,jp,mc,pj,ec,ei,es,fc,if,hw,ci,ii,il,ji,idp,id,js,pc,pr,rj,rp,rw,r
c,rq,ri,cf,rd,jm,cu,is,cp,md

What is the expected output? What do you see instead?

Going to /ngx_statistics shows 
css_filter_total_bytes_saved:                 -3041637

It is the only negative number there (including other statistics for resources 
both minified and combined, such as JS).

I'm pretty sure the numbers must be being calculated incorrectly, because it's 
inlining, minifying, and combining CSS just fine.

What version of the product are you using (please check X-Mod-Pagespeed
header)?
ngx_pagespeed d19dc5e6c67577272eef4ceb42adf04d2bdf2028 and pagespeed 1.5.27.2

On what operating system?
Linux 2.6.32 (Ubuntu 10.0.4)

Which version of Apache?
nginx 1.4.1

Which MPM?
N/A

URL of broken page:
N/A

Original issue reported on code.google.com by mqu...@gmail.com on 16 May 2013 at 3:39

GoogleCodeExporter commented 9 years ago
It is possible to get negative css_filter_bytes_saved because we put in larger 
absolute URLs when we rewrite subresources.

But I think you are right that we are just comparing the bytes before to bytes 
after of the single CSS file, thus all the images and other CSS files inlined 
into it are not being counted fairly as part of the bytes before.

Original comment by sligocki@google.com on 16 May 2013 at 4:38