简体   繁体   English

为什么gzip压缩对我来说比较慢?

[英]Why is gzip compression slower for me?

Why is http://storyfollower.com slower when I use gzip? 当我使用gzip时为什么http://storyfollower.com会变慢?

Check the data bellow: 检查下面的数据:

With compression: Load time 1.99s Page size 586.2kB Perf. 压缩:加载时间1.99秒页面大小586.2kB Perf。 grade 83/100 Archived: http://tools.pingdom.com/fpt/#!/nE0Jnn7Hp/http://storyfollower.com 等级83/100已存档: http ://tools.pingdom.com/fpt/#!/ nE0Jnn7Hp / http://storyfollower.com

Without Compression Load time 835ms Page size 756.2kB Perf. 没有压缩加载时间835ms页面大小756.2kB Perf。 grade 79/100 Archived: http://tools.pingdom.com/fpt/#!/nFmp4l3Ez/storyfollower.com 等级79/100已存档: http ://tools.pingdom.com/fpt/#!/ nFmp4l3Ez / storyfollower.com

thanks 谢谢

Most of the overhead is waiting for the server to send data. 大部分开销都在等待服务器发送数据。 I guess that is the time needed to compress the data. 我想这是压缩数据所需的时间。

Using compression for the page under test gains you very little: 587Kb -> 756Kb, so the CPU overhead is greater than what you gain from sending smaller data. 对被测页面使用压缩几乎没有:587Kb - > 756Kb,因此CPU开销大于发送较小数据所获得的开销。

I'd suggest you try with another page which sends more data. 我建议您尝试使用另一个发送更多数据的页面。 If you don't have such pages, then using compression is probably not the best choice. 如果您没有这样的页面,那么使用压缩可能不是最佳选择。

同时拥有gzip和低cpu开销的好方法是使用cdn并在那里存储gziped文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM