JuliaImages / ExifViewer.jl

Metadata reader in Julia, wrapper over LibExif
https://juliaimages.org/ExifViewer.jl/dev/
MIT License
28 stars 1 forks source link

Precompilation support, consistent speed improvements! #19

Closed ashwani-rathee closed 1 year ago

ashwani-rathee commented 1 year ago

Following the path of https://github.com/JuliaImages/ImageFiltering.jl/pull/255 and https://github.com/JuliaImages/ImageQualityIndexes.jl/pull/54 , Use of precompilation and utilization of latest options in precompilation through use of pkgimage has some great effects and improvements all across the board.

For me, initial invocation of

@time @eval read_tags("tmp.jpg"; read_all = true)

improves with latest options

Combination of precompilation and latest options in precompilation In 1.9.0 dropped from 0.58 seconds to 0.015 seconds, approximately 40x improvements which is impressive. In 1.8.5 dropped from 0.55 seconds to 0.37 seconds on use of precompilation.

I saw improvements almost all across board in benchmarks that can be found in gist below. One concern though for me is size of compiled caches of ExifViewer even in my basic testing, in 1.8.5 it was 1.92 mb(only .ji file) while in 1.9.0 it was 5.04mb(.ji + .dll file). ExifViewer.jl is a small package with just 2 functions and yet taking a lot of space surprisingly.

More details can be found here: https://gist.github.com/ashwani-rathee/d250abdd0172603448b0e81a96815681

codecov[bot] commented 1 year ago

Codecov Report

Base: 92.45% // Head: 93.06% // Increases project coverage by +0.61% :tada:

Coverage data is based on head (2f793a2) compared to base (9283ae7). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #19 +/- ## ========================================== + Coverage 92.45% 93.06% +0.61% ========================================== Files 4 5 +1 Lines 159 173 +14 ========================================== + Hits 147 161 +14 Misses 12 12 ``` | [Impacted Files](https://codecov.io/gh/JuliaImages/ExifViewer.jl/pull/19?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaImages) | Coverage Δ | | |---|---|---| | [src/ExifViewer.jl](https://codecov.io/gh/JuliaImages/ExifViewer.jl/pull/19?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaImages#diff-c3JjL0V4aWZWaWV3ZXIuamw=) | `100.00% <ø> (ø)` | | | [src/precompile.jl](https://codecov.io/gh/JuliaImages/ExifViewer.jl/pull/19?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaImages#diff-c3JjL3ByZWNvbXBpbGUuamw=) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaImages). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaImages)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.