Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Extremely slow import for other packages (DataFrames, Plots, ...) loaded after SciML packages #22

Closed
sjdaines opened this issue Mar 22, 2023 · 7 comments

Comments

@sjdaines
Copy link
Contributor

TruncatedStacktraces is apparently adding minutes to startup time, apparently due to a slowdown in import / using of other packages loaded after OrdinaryDiffEq. This is particularly bad with Julia 1.8 (? 1.8.3 tested here), resulting in several minutes increase to startup time.

Example timings for two sequences, with TruncatedStacktraces disabled and enabled (in LocalPreferences.toml)

  1. using OrdinaryDiffEq; import DataFrames; using Plots
  2. import DataFrames; using Plots; using OrdinaryDiffEq

Julia 1.8.3, linux

SciMLBase 1.91.2, TruncatedStackTraces 1.2.0

using OrdinaryDiffEq import DataFrames using Plots using OrdinaryDiffEq total
disable = true 20.8 5.8 14.7 - 41.3
disable = true - 3.0 7.4 20.3 30.7
disable = false 31.0 72.9 51.0 - 155.9
disable = false - 3.1 7.4 32.0 42.5

Julia 1.9.0-beta4, Windows (NB: also different computer to above)

SciMLBase 1.91.1, TruncatedStackTraces 1.2.0

using OrdinaryDiffEq import DataFrames using Plots using OrdinaryDiffEq total
disable = false 21.6 17.4 30.7 - 69.7
disable = false - 2.5 6.4 23.7 32.6
@ChrisRackauckas
Copy link
Member

What version of SciMLBase?

@sjdaines
Copy link
Contributor Author

some results were 1.91.2, some are 1.91.1 (see note above, doesn't look like that makes much difference)

@ChrisRackauckas
Copy link
Member

v1.91.2 should make a big difference because that would make 100% of the show methods disappear when disabled by the preference.

@ChrisRackauckas
Copy link
Member

It should make the disable=true one better I mean. disable=false won't change.

@sjdaines
Copy link
Contributor Author

disable=true works and restores previous behaviour (or close to it)

The problem here is that the default (no setting in LocalPreferences.toml) is causing problems with several minutes added to startup time, which is a real issue for users with Julia 1.8 (who are also not Julia power-users).

Could this be made an opt-in instead of an opt-out ?

@sjdaines
Copy link
Contributor Author

@ChrisRackauckas
Copy link
Member

Fixed by making stacktraces huge by default.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants