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

chore: lazily load large dependencies #49

Merged
merged 3 commits into from
Jul 2, 2022
Merged

chore: lazily load large dependencies #49

merged 3 commits into from
Jul 2, 2022

Conversation

johnnychen94
Copy link
Member

@johnnychen94 johnnychen94 commented Jul 2, 2022

This reduces the package loading time from 4.1s to 0.8s on my machine
without affecting the execution time much. For 512x512 image:

assess_psnr:
before: 61.394 μs (0 allocations: 0 bytes)
after: 62.824 μs (12 allocations: 352 bytes)
assess_ssim:
before: 9.029 ms (812 allocations: 41.13 MiB)
after: 8.944 ms (869 allocations: 41.13 MiB)

This reduces the package loading time from 4.1s to 0.8s on my machine
without affecting the execution time much. For 512x512 image:

assess_psnr:
  before: 61.394 μs (0 allocations: 0 bytes)
  after: 62.824 μs (12 allocations: 352 bytes)
assess_ssim:
  before: 9.029 ms (812 allocations: 41.13 MiB)
  after: 8.944 ms (869 allocations: 41.13 MiB)
@codecov
Copy link

codecov bot commented Jul 2, 2022

Codecov Report

Merging #49 (fbf6b85) into master (aca3975) will decrease coverage by 0.48%.
The diff coverage is 93.33%.

@@            Coverage Diff             @@
##           master      #49      +/-   ##
==========================================
- Coverage   97.23%   96.75%   -0.49%     
==========================================
  Files           6        7       +1     
  Lines         181      185       +4     
==========================================
+ Hits          176      179       +3     
- Misses          5        6       +1     
Impacted Files Coverage Δ
src/ImageQualityIndexes.jl 0.00% <0.00%> (ø)
src/psnr.jl 96.15% <ø> (ø)
src/entropy.jl 83.33% <100.00%> (ø)
src/msssim.jl 100.00% <100.00%> (ø)
src/ssim.jl 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aca3975...fbf6b85. Read the comment docs.

@johnnychen94 johnnychen94 merged commit 166cbc7 into master Jul 2, 2022
@johnnychen94 johnnychen94 deleted the jc/lazy branch July 2, 2022 08:26
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

Successfully merging this pull request may close these issues.

1 participant