Skip to content

Test dependency accounts for almost all the load time #38

Open

Description

@timholy

This package loads two others, InverseFunctions and Test. Claude measured their load times for me (Julia 1.13.1):

┌──────────────────┬─────────────────────────────────────┬─────────────┐
│     Package      │     Six fresh-process runs (ms)     │ Median (ms) │
├──────────────────┼─────────────────────────────────────┼─────────────┤
│ InverseFunctions │ 8.9, 2.2, 11.4, 2.0, 4.8, 2.4       │ ~2–5        │
├──────────────────┼─────────────────────────────────────┼─────────────┤
│ Test             │ 231.3, 72.3, 74.7, 83.3, 73.8, 98.1 │ ~79         │
├──────────────────┼─────────────────────────────────────┼─────────────┤
│ DensityInterface │ 84.5, 77.1, 84.9, 84.0, 67.8, 71.2  │ ~80         │
└──────────────────┴─────────────────────────────────────┴─────────────┘

This is a clear argument for splitting Test support out as an extension.

Activity

  1. timholy commented on Oct 15, 2026

    @timholy
    MemberAuthor

    Since this is a breaking change, a related question: when that's done, should we bump to 0.5 or 1.0?

  2. devmotion commented on Oct 15, 2026

    @devmotion
    Member

    Seems reasonable to me, I somehow thought it's an extension already - as in InverseFunctions. I wonder if some of the load time might be due to the surprisingly slow __init__ function in InverseFunctions: JuliaMath/InverseFunctions.jl#67

  3. timholy commented on Oct 15, 2026

    @timholy
    MemberAuthor

    Huh, I would have thought that would have been included in Claude's measurements. Did you measure that with any other packages loaded? If so, my precompilation suggestion won't help if it's invalidation.

  4. gdalle commented on Oct 15, 2026

    @gdalle

    I think moving to an extension is reasonable

  5. devmotion commented on Oct 15, 2026

    @devmotion
    Member

    Did you measure that with any other packages loaded?

    No, empty environment with --startup-file=no. But it seems I was just measuring a @time_imports artifact: JuliaMath/InverseFunctions.jl#67 (comment)

  6. oschulz commented on Oct 15, 2026

    @oschulz
    Collaborator

    I think moving to an extension is reasonable

    If it gives us a real benefit, fine with me as well. We also use an Test extension in InverseFunctions.jl and ChangesOfVariables.jl.

    Since this is a breaking change, a related question: when that's done, should we bump to 0.5 or 1.0?

    I guess it would be time for a 1.0 then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions