Skip to content

Comments

Reduce frequency of re-lookup of Base.loaded_modules_array#707

Open
BioTurboNick wants to merge 2 commits intoJuliaIO:masterfrom
BioTurboNick:scoped-modules
Open

Reduce frequency of re-lookup of Base.loaded_modules_array#707
BioTurboNick wants to merge 2 commits intoJuliaIO:masterfrom
BioTurboNick:scoped-modules

Conversation

@BioTurboNick
Copy link

Fixes #706

@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.40%. Comparing base (d144466) to head (35be154).

Files with missing lines Patch % Lines
src/data/specialcased_types.jl 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #707      +/-   ##
==========================================
+ Coverage   87.37%   87.40%   +0.02%     
==========================================
  Files          37       37              
  Lines        4587     4596       +9     
==========================================
+ Hits         4008     4017       +9     
  Misses        579      579              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JonasIsensee
Copy link
Collaborator

Hi @BioTurboNick ,
thanks for the issue report and for this attempted fix.

Annoyingly, i don't think this approach will actually remove the issue though.

Iirc the find_type code path is hit while trying to load data and not while opening a file handle.
Therefore, every API function (mostly read and getindex) would need this.
However, IIRC, these are not only external API but also sometimes used internally. That would need to be checked.

@BioTurboNick BioTurboNick changed the title Make Base.loaded_module_array() lookup a scoped value set in jldopen Reduce frequency of re-lookup of Base.loaded_modules_array Jan 17, 2026
@BioTurboNick
Copy link
Author

BioTurboNick commented Jan 17, 2026

Good points.

How about this OncePerTask solution? Though it only works on Julia 1.12+

EDIT: And it occurs to me I'm not confident that this is a safe way to use world age...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

find_type causes lock contention

2 participants