简体   繁体   中英

Does compression increase performance?

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 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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