-
Notifications
You must be signed in to change notification settings - Fork 37
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
Julia 1.7 performance regression on JPEG image #208
Comments
See also JuliaImages/ImageCore.jl#174 |
I can confirm. It takes 1.5 seconds to load a 6 MB image using FileIO, Colors
img = rand(RGB, 1440, 2560)
file = "img.jpg"
save(file, img)
using BenchmarkTools
filesize(file) # 6422686 bytes
@btime load(file); # 1.478 s (44236892 allocations: 1.51 GiB) on (tmp) pkg> status
Status `~/tmp/Project.toml`
[5789e2e9] FileIO v1.11.2
[6218d12a] ImageMagick v1.2.2
julia> versioninfo()
Julia Version 1.7.0
Commit 3bf9d17731 (2021-11-30 12:12 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: AMD Ryzen Threadripper 2950X 16-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, znver1) |
Upstream patch JuliaLang/julia#43347 should fixes this, so keep patient on Julia 1.7.1... |
Just checked on 1.7.1, the problem persists |
Yeah, can confirm, it is not resolved in 1.7.1. For my MWE above I still get: julia> @btime load(file);
1.680 s (44236892 allocations: 1.51 GiB) |
Unfortunately that PR isn't merged yet. I'll see if I can continue https://github.com/stevengj/JpegTurbo.jl and bring up the JPEG wrapper before Feb. |
Almost ready now. Just need to wait for a few days before registering it. Feel free to try https://github.com/johnnychen94/JpegTurbo.jl out. |
A better solution is now available at https://github.com/johnnychen94/JpegTurbo.jl. For ImageMagick itself, this should be fixed for Julia 1.8. I currently have very little interest in maintaining the old v6 version. Our plan is to gradually deprecate this package with the newer ImageIO. |
CRef: JuliaImages/Images.jl#992
The following patch fixes the performance issue, but I'm lost in the memory orders...
cc: @etibarg
The text was updated successfully, but these errors were encountered: