Skip to content

Improving @require performance #39

@rofinn

Description

@rofinn

I'm not sure if there's much that can be done, but the @require appears be hurting my load times by an order of magnitude. I'm guessing this has something to do with what code is able to be cached between julia sessions?

Loading Glob.jl and URIParser.jl w/ the appropriate glue code:

julia> @time using FilePaths
  0.067642 seconds (37.85 k allocations: 2.538 MiB)

Using 2 @require blocks for the Glob.jl and URIParser.jl glue code (not loading those packages):

julia> @time using FilePaths
  0.527255 seconds (367.49 k allocations: 20.297 MiB, 14.84% gc time)

NOTES: I have precompile enabled and this is after the cache has been updated between changes. I also ran it a few times for each and got fairly consistent results.

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