JuliaIO / VideoIO.jl

Reading and writing of video files in Julia via ffmpeg
https://juliaio.github.io/VideoIO.jl/stable
Other
125 stars 53 forks source link

Lazy-load cameras to improve package load time #351

Closed IanButterworth closed 2 years ago

IanButterworth commented 2 years ago

Defers populating available cameras and identifying the default until the user requests cameras, which helps package load time.

Before

julia> @time using VideoIO
  2.679612 seconds (3.20 M allocations: 237.017 MiB, 3.63% gc time, 34.81% compilation time)

This PR

julia> @time using VideoIO
  2.183519 seconds (2.97 M allocations: 221.639 MiB, 3.81% gc time, 27.94% compilation time)
codecov[bot] commented 2 years ago

Codecov Report

Merging #351 (437ee56) into master (c449ccf) will decrease coverage by 3.38%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #351      +/-   ##
==========================================
- Coverage   82.16%   78.78%   -3.39%     
==========================================
  Files          10       10              
  Lines        1245     1249       +4     
==========================================
- Hits         1023      984      -39     
- Misses        222      265      +43     
Impacted Files Coverage Δ
src/VideoIO.jl 18.18% <ø> (-36.17%) :arrow_down:
src/avio.jl 77.01% <0.00%> (-5.51%) :arrow_down:
src/avdictionary.jl 0.00% <0.00%> (-8.83%) :arrow_down:

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 c449ccf...437ee56. Read the comment docs.