Improvement: Add Cache layer to Graph::build steps #18
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.
Fixes #14
Closes #14
Using
feature/many-many-support
as the base so that I could test with "full support" added. Plus there were to method name changes on that branch.Manual test
I made a quick test that ran each
build
method 100 times, and then output the average time per iteration in milliseconds. I set this up on a recent project that has a reasonably small configuration layer (8 blocks, 2 pages, Site Config, etc).I was surprised by how quick the build process was (on average) even when uncached, but it's worth mentioning that it will (of course) get worse with scale.
Result
Uncached - milliseconds per build iteration: 22.61
Cached - milliseconds per build iteration: 0.63
Test that I ran
Test coverage
Graph
properties are set correctly from cache on buildGraph
properties are set correctly from cache on secondary request