JuliaData / JuliaData/TableMetadataTools.jl
Make Unitful a weak dependency to improve load time
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 19
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
It would be interesting to make Unitful not a required dependency, for example by using Package Extensions to define the unit-related functionality only when Unitful is loaded: https://docs.julialang.org/en/v1/manual/code-loading/#man-extensions
Currently, the Unitful dependency dominates the load time of TableMetadataTools:
julia> Pkg.status()
Status `/tmp/jl_Av2tSv/Project.toml`
[9ce81f87] TableMetadataTools v0.1.0
julia> @time_imports using TableMetadataTools
0.5 ms DataAPI
0.1 ms DataValueInterfaces
0.1 ms IteratorInterfaceExtensions
0.1 ms TableTraits
2.8 ms OrderedCollections
6.8 ms Tables
140.8 ms Unitful
0.3 ms TableMetadataTools
https://docs.julialang.org/en/v1/manual/code-loading/#man-extensions
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the TableMetadataTools package-loading setup and the Julia Package Extensions documentation linked in the issue; use @time_imports with and without Unitful to establish the baseline. Done means Unitful is no longer required for ordinary TableMetadataTools loading while unit-related functionality is available when Unitful is loaded, with the reported load-time cost reduced.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100