OrdinaryDiffEq.jl icon indicating copy to clipboard operation
OrdinaryDiffEq.jl copied to clipboard

use SnoopPrecompile.@precompile_setup

Open aviatesk opened this issue 2 years ago • 9 comments

This allows us to turn off precompilation of OrdinaryDiffEq via Preferences.jl

aviatesk avatar Apr 14 '23 07:04 aviatesk

How is this different from the previous precompilation preferences?

ChrisRackauckas avatar Apr 14 '23 10:04 ChrisRackauckas

By wrapping the precompilation workload by SnoopPrecompile.@precompile_setup, we can turn off the precompilation via Preferences.jl. For example, you can have LocalPreferences.toml at the root of the project with the following contents

[SnoopPrecompile]
skip_precompile = ["OrdinaryDiffEq"]

and then the precompilation will be turned off. This setting can be useful when we develop OrdinaryDiffEq or a parent package using it since precompiling OrdinaryDiffEq takes quite some time.

aviatesk avatar Apr 14 '23 10:04 aviatesk

But you could've already done that before with the more refined precompilation controls? I guess having another way to do it is fine. Can you add this to the documentation page on precompilation controls in DiffEqDocs?

ChrisRackauckas avatar Apr 14 '23 10:04 ChrisRackauckas

But you could've already done that before with the more refined precompilation controls?

Yes, we can always edit the package file directly. The Preferences.jl approach is more useful when we develop a package that has OrdinaryDiffEq.jl as its dependency, since it allows us to turn of the compilation of this package just by placing LocalPreferences.toml on the parent package directly.

Can you add this to the documentation page on precompilation controls in DiffEqDocs?

Yeah, but I guess OrdinaryDiffEq/docs is the better place for that?

aviatesk avatar Apr 16 '23 06:04 aviatesk

The Preferences.jl approach is more useful when we develop a package that has OrdinaryDiffEq.jl as its dependency, since it allows us to turn of the compilation of this package just by placing LocalPreferences.toml on the parent package directly.

That doesn't answer the question though, since it's still Preferences.

Yeah, but I guess OrdinaryDiffEq/docs is the better place for that?

But the old docs also need to be updated.

ChrisRackauckas avatar Apr 16 '23 06:04 ChrisRackauckas

That doesn't answer the question though, since it's still Preferences.

I'm not sure I understand the question. SnoopPrecompile automatically loads Preferences.jl and looks for configurations specified in LocalPreferences.toml when a package that uses SnoopPrecompile is precompiled.

But the old docs also need to be updated.

Okay, I will submit a PR to DiffEqDocs.jl too. I will push a commit that update this package's docs quickly.

aviatesk avatar Apr 16 '23 06:04 aviatesk

Wow, it looks like SciML's documentation is even more sophisticatedly structured than I anticipated. It seems like we just need to update DiffEqDocs. I believe that this pull request is good to go as it stands.

aviatesk avatar Apr 16 '23 06:04 aviatesk

@ChrisRackauckas bump?

aviatesk avatar Apr 17 '23 14:04 aviatesk

I don't recall seeing the DiffEqDocs PR?

ChrisRackauckas avatar Apr 17 '23 14:04 ChrisRackauckas

@oscardssmith is there something to update from this?

ChrisRackauckas avatar May 20 '24 20:05 ChrisRackauckas

I think this can just be closed, but ideally @aviatesk would confirm.

oscardssmith avatar May 20 '24 21:05 oscardssmith