JuliaIO / VideoIO.jl

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

Speeding up load time #199

Closed IanButterworth closed 5 years ago

IanButterworth commented 5 years ago

Master:

julia> @time using VideoIO
  5.601775 seconds (14.84 M allocations: 769.344 MiB, 5.81% gc time)
julia> exit()
...
julia> @time using VideoIO
  5.632717 seconds (14.84 M allocations: 769.345 MiB, 5.84% gc time)

This PR:

julia> @time using VideoIO
  3.208445 seconds (8.84 M allocations: 442.302 MiB, 7.95% gc time)
julia> exit()
...
julia> @time using VideoIO
  3.186645 seconds (8.84 M allocations: 442.302 MiB, 8.00% gc time)

@SimonDanisch Any other easy ideas?

asinghvi17 commented 5 years ago

Could drop Requires on master, VideoPlayer.jl should be coming along fairly soon (in a week or so)

asinghvi17 commented 5 years ago

Also, is N0F8 available through color types? May be possible to drop the dependency on fixedpointnumbers and just rely on colortypes

IanButterworth commented 5 years ago

For Requires I'll wait for VideoPlayer.jl to be ready 👍🏻

And ColorTypes can provide N0f8 👍🏻

IanButterworth commented 5 years ago

Relying on ColorTypes for N0f8 has actually slowed it down a bit 🤔

julia> @time using VideoIO
  3.728758 seconds (8.82 M allocations: 440.791 MiB, 7.64% gc time)
julia> exit()
...
julia> @time using VideoIO
  3.712868 seconds (8.82 M allocations: 440.793 MiB, 7.59% gc time)