Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postpone hash-check for supplied cwebp binaries till needed #287

Closed
rosell-dk opened this issue May 18, 2021 · 0 comments
Closed

Postpone hash-check for supplied cwebp binaries till needed #287

rosell-dk opened this issue May 18, 2021 · 0 comments
Assignees

Comments

@rosell-dk
Copy link
Owner

Doing a checksum on a supplied binary is time consuming. On a typical system, it takes 10-20 ms - which is as long as cwebp uses for converting a typical 80 kb jpeg.

The problem has gotten worse as the supplied binaries has grown - especially for Linux. We now supply 4 different binaries for Linux. The reason behind this is that the binaries have different dependencies, and we want it to work on as many systems as possible. And we also want to supply the newest version. See #196 and #278.

Currently, the checksums are performed on all supplied binaries for the given OS. However, as we know the versions of the cwebps beforehand, it is not neccessary to do a checksum in order to get the version (currently, the version is detected by calling the cwebp with the -version flag). The hash check could be postponed till right before doing the conversion. In case a cwebp binary is found using one of the other methods, and it is not an older version than the supplied binaries, no hash check will need to be run at all.

See #285 for the discussion that lead up to this

@rosell-dk rosell-dk added this to the 2.6.0 milestone May 18, 2021
@rosell-dk rosell-dk self-assigned this May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant