Preload current records#8
Merged
Merged
Conversation
Why these changes are being introduced: This notebook makes heavy use of current records in the TIMDEX dataset, specifically for alma. TDA was updated to lazy load current records as a view by default given the somewhat infrequent use, but does allow for "preloading" the current records as a materialized table for repeated queries, which is precisely what this notebook does. How this addresses that need: * Instantiates TIMDEXDataset with `preload_current_records=True` which loads current records into memory to speed up queries thereafter. Side effects of this change: * None Relevant ticket(s): * None
ghukill
commented
Oct 20, 2025
| timdex_dataset = TIMDEXDataset(os.environ["TIMDEX_DATASET_LOCATION"]) | ||
| timdex_dataset = TIMDEXDataset( | ||
| os.environ["TIMDEX_DATASET_LOCATION"], | ||
| preload_current_records=True, |
Contributor
Author
There was a problem hiding this comment.
This is really the only meaningful change!
jonavellecuerdo
approved these changes
Oct 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose and background context
In a recent TDA PR, it now requires "opting in" to materialize metadata for current records when instantiating
TIMDEXDataset. Most operations do not require current records, but this notebook is an exception where each query does utilize the current records.As such, it makes sense to pay a load time + memory hit in the beginning to speed up queries once the notebook is fully loaded.
How can a reviewer manually see the effects of these changes?
Not much to see! The primary change is
TIMDEXDataset(<location>, preload_current_records=True)which is covered in the TDA PR.Running locally, confirms that queries are generally 2-3x times faster by preloading the current records metadata.
Includes new or updated dependencies?
YES
Changes expectations for external applications?
NO
What are the relevant tickets?