-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
only load collections once #15344
only load collections once #15344
Conversation
CodSpeed Performance ReportMerging #15344 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a style nit, otherwise love it! thank you
Would it make sense to put this optimization in the |
It might! We'd need to cache the output of the function and return that instead. I'll throw up a version like that for you guys to check out. Nothing crazy, but also that object will live in memory, of course. |
Delayed a bit while I add a test suite for the plugins module but should be ready this morning PT. |
I pushed up some commits with the changes we discussed. However, GitHub must be "having a moment" because while the commits appear in the branch, this PR isn't reflecting them. 🙄 A problem for tomorrow. |
@desertaxle @cicdw This is ready again. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Any time we look up a block from a block document, we load all collections from disk, even if we've already loaded them. It seems unlikely that these will change while the process is running or that we need to support collections changing out from under a running process, so this PR loads them only once. A micro-optimization? Maybe.
Checklist
<link to issue>
"mint.json
.