Skip to content

Add more associations and improve performance and warnings#929

Merged
rgalanakis merged 7 commits into
mainfrom
efficient-admin-prep
May 25, 2026
Merged

Add more associations and improve performance and warnings#929
rgalanakis merged 7 commits into
mainfrom
efficient-admin-prep

Conversation

@rgalanakis
Copy link
Copy Markdown
Member

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.

  • 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.

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.

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.
@rgalanakis rgalanakis marked this pull request as ready for review May 25, 2026 01:34
Reconfiguring the model replaced the DB which caused
spec corruption.
@rgalanakis rgalanakis force-pushed the efficient-admin-prep branch from 743f879 to 74fd571 Compare May 25, 2026 04:38
@rgalanakis rgalanakis merged commit 91b20f4 into main May 25, 2026
2 of 3 checks passed
@rgalanakis rgalanakis deleted the efficient-admin-prep branch May 25, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant