Skip to content

Commit 5d6190f

Browse files
author
Dani Pinyol
committed
preference to disable initial cache of fieldtypes(#991)
1 parent e9a591b commit 5d6190f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/packagedef.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1653,8 +1653,9 @@ function __init__()
16531653
end
16541654
end
16551655

1656+
precache = Preferences.@load_preference("precache_fieldtypes", true)
16561657
# Populate field types map cache (only on main process, not on workers)
1657-
if __bpart__ && (isnothing(distributed_module) || distributed_module.myid() == 1)
1658+
if precache && __bpart__ && (isnothing(distributed_module) || distributed_module.myid() == 1)
16581659
Threads.@spawn :default foreach_subtype(Any) do @nospecialize type
16591660
# Populating this cache can be time consuming (eg, 30s on an
16601661
# i7-7700HQ) so do this incrementally and yield() to the scheduler

0 commit comments

Comments
 (0)