Add more associations and improve performance and warnings#929
Merged
Conversation
This was a beast, as these things often go, but we need this for future pagination, and we need eager loading or things break for some reason due to tactical eager loading and large association warning.
Add two plugins to help with association loading performance. - large association warning: warn when associations over a certain size are loaded. Prevents unexpectedly blowing out memory. - efficient each: Allows 1) reusing a loaded association array, 2) streaming a not-loaded association from the database, and 3) storing a streamed association into the array if it's just one page. Move each_cursor_page to this plugin.
Loading combined_book_transactions could be very big. Use efficient_each to optimizing loading.
Reconfiguring the model replaced the DB which caused spec corruption.
743f879 to
74fd571
Compare
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.
Pull some yak shaved code out of #928 so it can be reviewed and tested more easily. This provides some new plugins, moves code into associations, and provides other related fixes.
Ledger: Use efficient_each
Loading combined_book_transactions could be very big.
Use efficient_each to optimizing loading.
Add useDebugEffect to debug things on load.
Add association loading performance plugins
Add two plugins to help with association loading performance.
Vendor: Add discounted_rates association
Card: Add originated_funding_transactions dataset
Turn combined_notes into an association
This was a beast, as these things often go,
but we need this for future pagination,
and we need eager loading or things break
for some reason due to tactical eager loading
and large association warning.