barnacs / compy

HTTP/HTTPS compression proxy
ISC License
204 stars 34 forks source link

Some files become larger after compression/transcoding #30

Open g-rock84 opened 6 years ago

g-rock84 commented 6 years ago

I was testing Compy on some http websites and I am getting some strange numbers for the "amount transcoded" report. Example: 2017/10/03 07:53:27 transcoded: 53 -> 77 (145.3%) 2017/10/03 07:53:27 transcoded: 61 -> 74 (121.3%) 2017/10/03 07:52:56 transcoded: 61 -> 74 (121.3%) 2017/10/03 07:52:56 transcoded: 69 -> 93 (134.8%) 2017/10/03 07:52:28 transcoded: 0 -> 23 (+Inf%)

@gaul mention:

Very small HTML and images can increase in size due to overhead of compression metadata and possibly different formats have different overhead, e.g., GIF vs. WebP.

Perhaps a conditional statement could be included, such as "if x is this small or smaller then bypass transcoding/compression, else transcode/compress"?

ignaciovidalfranco commented 6 years ago

I agree. I also face the very same problem.

gaul commented 6 years ago

Could you share which pages exhibit these symptoms so we can track them more precisely?

ignaciovidalfranco commented 6 years ago

You can check http://en.simplesite.com/, which is a simple HTTP served page.

2017/12/13 00:35:42 transcoded: 807 -> 807 (100.0%) 2017/12/13 00:35:42 transcoded: 259 -> 259 (100.0%) 2017/12/13 00:35:42 transcoded: 113 -> 116 (102.7%) 2017/12/13 00:35:42 transcoded: 1657 -> 1657 (100.0%) 2017/12/13 00:35:42 transcoded: 7998 -> 7998 (100.0%) 2017/12/13 00:35:42 transcoded: 4400 -> 4400 (100.0%) 2017/12/13 00:35:42 transcoded: 49896 -> 56406 (113.0%) 2017/12/13 00:35:42 transcoded: 25220 -> 25220 (100.0%) 2017/12/13 00:35:42 transcoded: 17515 -> 17515 (100.0%) 2017/12/13 00:35:42 transcoded: 32090 -> 32090 (100.0%) 2017/12/13 00:35:42 transcoded: 77651 -> 88735 (114.3%) 2017/12/13 00:35:42 transcoded: 83303 -> 93407 (112.1%) 2017/12/13 00:35:42 transcoded: 60399 -> 67544 (111.8%) 2017/12/13 00:35:42 transcoded: 93691 -> 105071 (112.1%) 2017/12/13 00:35:42 transcoded: 89246 -> 103081 (115.5%) 2017/12/13 00:35:42 transcoded: 76702 -> 82711 (107.8%)

JFingerle commented 2 years ago

This seems to be fixed in the current version of compy. I just checked the logs of my compy server and there are no percentages above 100. I also visited http://en.simplesite.com/ and there is nothing over 100%.

-> Issue can be closed IMHO

ignaciovidalfranco commented 2 years ago

Well, it would be nice to track down which commit fixed the issue. Also, http://en.simplesite.com is not the same as it was in 2017...

And, I don't really use compy anymore, as mobile data has become dirt cheap for me!