Skip to content

import FilePaths harmful for load time #4842

Open
@jaakkor2

Description

@jaakkor2
  • what version of Makie are you running? (]st -m Makie)
Status `C:\Users\jaakkor2\MyTemp\debug\Project.toml`
  [8bb1440f] DelimitedFiles v1.9.1
  [cd3eb016] HTTP v1.10.15
  [ee78f7c6] Makie v0.22.2 `C:\Users\jaakkor2\.julia\dev\Makie`
  [477bde09] MyDebugPkg v1.0.0-DEV `C:\Users\jaakkor2\.julia\dev\MyDebugPkg`
  [bca83a33] OptimizationBase v2.4.0
  • can you reproduce the bug with a fresh environment ? (]activate --temp; add Makie)
  • What platform + GPU are you on? WIndows 11, Intel i7-1370P with integrated GPU

On Julia v"1.12.0-DEV.2047" (1.12-nightly in juliaup), a package with only these lines shows considerably longer using times due to import of FilePaths in Makie.

module MyDebugPkg

import HTTP
import DelimitedFiles
import OptimizationBase
using Makie

end

Commenting out line https://github.com/MakieOrg/Makie.jl/blob/v0.22.2/src/Makie.jl#L15-L19

import FilePaths

improves usage time considerably, @time using MyDebugPkg outputs

master

  6.175683 seconds (9.32 M allocations: 499.577 MiB, 5.25% gc time, 23.91% compilation time: 79% of which was recompilation)

without FilePaths

  4.779248 seconds (7.07 M allocations: 381.341 MiB, 6.74% gc time, 1.56% compilation time: 65% of which was recompilation)

Makie is the only user of FilePaths

(debug) pkg> why FilePaths
  Makie → FilePaths
  MyDebugPkg → Makie → FilePaths

Related report on Electron was filed, but closed davidanthoff/Electron.jl#128.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions