Skip to content

Weak deps/Extension pkgs on Unitful? #240

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

Open
anandijain opened this issue Jan 25, 2023 · 2 comments
Open

Weak deps/Extension pkgs on Unitful? #240

anandijain opened this issue Jan 25, 2023 · 2 comments
Labels
⭐✨ Quality ✨⭐ QA, cleaning, testing, CIs

Comments

@anandijain
Copy link
Collaborator

julia> @time_imports using SBML
      2.5 ms  Zlib_jll
      3.1 ms  Libiconv_jll
      1.8 ms  XML2_jll
     63.9 ms  SBML_jll
      1.9 ms  DocStringExtensions
     10.9 ms  IfElse
      8.6 ms  ConstructionBase
    832.3 ms  Unitful
    160.4 ms  SBML

I usually don't use the Unitful stuff, so maybe it would be a good candidate for https://pkgdocs.julialang.org/dev/creating-packages/#Weak-dependencies

this is off the cuff, no urgency

@exaexa
Copy link
Member

exaexa commented Jan 25, 2023

Hi, yeah this is very true and actually one of the reason I had to remove symbolics (the overhead of these was just too much). If there's some straightforward and reliable way to make unitful load on demand, let's do it. We could even push Unitful to a separate package (UnitfulSBML.jl? :D ), but l'd still prefer something that leaves the repo in one piece.

Btw, how does the Julia1.9 precompilation speedup affect unitful? Wouldn't there be some opportunity to massively fix the load times by fixing methods, like as happened with JuMP?

@exaexa exaexa added the ⭐✨ Quality ✨⭐ QA, cleaning, testing, CIs label Feb 21, 2023
@exaexa
Copy link
Member

exaexa commented Jan 5, 2025

just for the record, with julia 1.11 we're at this:

julia> @time_imports using SBML
      0.6 ms  Printf
     26.4 ms  Dates
      0.7 ms  TOML
     12.5 ms  Preferences
      0.5 ms  JLLWrappers
               ┌ 0.1 ms Zlib_jll.__init__() 
    142.2 ms  Zlib_jll 97.45% compilation time
               ┌ 5.2 ms Libiconv_jll.__init__() 92.35% compilation time
      5.8 ms  Libiconv_jll 83.70% compilation time
               ┌ 0.4 ms XML2_jll.__init__() 
      1.0 ms  XML2_jll
               ┌ 7.1 ms SBML_jll.__init__() 
      7.5 ms  SBML_jll
               ┌ 0.0 ms NetworkOptions.__init__() 
      3.4 ms  NetworkOptions
               ┌ 0.7 ms MbedTLS_jll.__init__() 
      4.8 ms  MbedTLS_jll
               ┌ 0.2 ms LibSSH2_jll.__init__() 
      4.2 ms  LibSSH2_jll
               ┌ 0.3 ms LibGit2_jll.__init__() 
      4.1 ms  LibGit2_jll
     11.3 ms  LibGit2
               ┌ 0.0 ms DocStringExtensions.__init__() 
      1.1 ms  DocStringExtensions
      0.1 ms  IfElse
               ┌ 1.3 ms SuiteSparse_jll.__init__() 
      4.5 ms  SuiteSparse_jll
      1.1 ms  Serialization
               ┌ 10.4 ms SparseArrays.CHOLMOD.__init__() 94.56% compilation time
    183.4 ms  SparseArrays 5.34% compilation time
    201.7 ms  Unitful
     46.3 ms  SBML

I think unitful code might eventually get somehow virtualized out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐✨ Quality ✨⭐ QA, cleaning, testing, CIs
Projects
None yet
Development

No branches or pull requests

2 participants