Drivine 0.0.85, whose session no longer holds a copy of every node it loads - #120
Merged
Merged
Conversation
… loads GraphObjectManager's dirty-tracking session kept a full JSON snapshot of every node ever loaded, for the life of the application. In a running appliance it held 325 MB after 29 documents. 0.0.85 stores shape, ids and hashes instead, bounds the session, and makes it thread-safe. 0.0.85 also makes a saved relationship list authoritative whether or not the view was loaded first.
jimador
approved these changes
Sep 28, 2026
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.
Drivine's session held a JSON copy of every node ever loaded, for the life of the app. 0.0.85 bounds it.
Before
GraphObjectManager's session kept full snapshots, embeddings and text included, and never released them: 325 MB of a 518 MB live heap after ingesting 29 documents into an appliance.Now
drivine.query.session-max-entries); thread-safe. Dirty tracking across transactions still works.Behaviour change to be aware of: a saved relationship list is now authoritative even if the view was not loaded first. Relationships of that type to targets not in the list are removed.
Key change
Tests: 2,674 tests across all modules, 0 failures (Neo4j containers), run on JDK 21 against 0.0.85. No source changes were needed; nothing here calls the constructors or
SessionManagermethods whose signatures changed.