JuliaData / JuliaData/TableMetadataTools.jl

Make Unitful a weak dependency to improve load time

Open
#4 0 comments 1 reaction 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.