开发者

Does compression increase performance?

开发者 https://www.devze.com 2023-02-15 19:28 出处:网络
I\'m using java and have many pictures to load from the hard drive. Generally, is it faster to use highly compressed pictures (that probably take long 开发者_JAVA技巧to decompress) or not compressed

I'm using java and have many pictures to load from the hard drive.

Generally, is it faster to use highly compressed pictures (that probably take long 开发者_JAVA技巧to decompress) or not compressed pictures (that probably take long to load, but no time is spent on decompreesing the pictures)?


As for most questions like this, I would recommend you measuring this.

It'll be dependent on so much. Your pictures, your algorithm, your deployment platform (CPUs, disk space etc.). I don't think anyone could give a remotely accurate idea without being familiar with the above variables.

Note (also) that premature optimisation is (often) the root of all evil. It's often advisable to choose the simplest solution (here - using no compression) and start to look at this as/when performance becomes an issue.

0

精彩评论

暂无评论...
验证码 换一张
取 消