All Charges screen performance boost: Tame invalidLedger + memoize getChargeType#4031
Open
gilgardosh wants to merge 2 commits into
Open
All Charges screen performance boost: Tame invalidLedger + memoize getChargeType#4031gilgardosh wants to merge 2 commits into
invalidLedger + memoize getChargeType#4031gilgardosh wants to merge 2 commits into
Conversation
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
gilgardosh
temporarily deployed
to
accounter-fullstack
July 22, 2026 14:29 — with
GitHub Actions
Inactive
gilgardosh
temporarily deployed
to
accounter-fullstack
July 22, 2026 14:29 — with
GitHub Actions
Inactive
invalidLedger + memoize getChargeTypeinvalidLedger + memoize getChargeType
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves server-side charge classification and ledger-validation performance by memoizing derived charge types per request and short-circuiting invalidLedger for trivially-empty common charges, reducing unnecessary ledger-generation work.
Changes:
- Pass full
chargerows into ledger-lock meta helpers to enable the enriched/aggregate fast-path. - Add an
invalidLedgerearly-return for empty Common/CreditcardBank charges to skip ledger generation when it’s guaranteed to be a no-op. - Memoize derived (null-DB-typed) charge types per request via an injector-keyed cache to avoid repeated derivations during GraphQL type resolution.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/server/src/modules/ledger/helpers/ledger-lock.ts | Uses charge-row-based meta helpers to compute lock dates more efficiently (enriched fast-path). |
| packages/server/src/modules/charges/resolvers/charges.resolver.ts | Adds an “empty charge” short-circuit in invalidLedger to skip expensive ledger generation. |
| packages/server/src/modules/charges/helpers/charge-type.ts | Adds request-scoped memoization for derived charge types (null type). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
gilgardosh
force-pushed
the
all-charges-performance-boost-3
branch
3 times, most recently
from
July 22, 2026 14:43
01225f5 to
17a8543
Compare
gilgardosh
force-pushed
the
all-charges-performance-boost-4
branch
from
July 22, 2026 14:44
204723c to
a40dd82
Compare
gilgardosh
temporarily deployed
to
accounter-fullstack
July 22, 2026 14:44 — with
GitHub Actions
Inactive
gilgardosh
temporarily deployed
to
accounter-fullstack
July 22, 2026 14:44 — with
GitHub Actions
Inactive
gilgardosh
temporarily deployed
to
accounter-fullstack
July 22, 2026 15:00 — with
GitHub Actions
Inactive
gilgardosh
temporarily deployed
to
accounter-fullstack
July 22, 2026 15:01 — with
GitHub Actions
Inactive
gilgardosh
force-pushed
the
all-charges-performance-boost-4
branch
from
July 22, 2026 15:02
6bf7fd3 to
0844fc1
Compare
gilgardosh
temporarily deployed
to
accounter-fullstack
July 22, 2026 15:02 — with
GitHub Actions
Inactive
gilgardosh
temporarily deployed
to
accounter-fullstack
July 22, 2026 15:02 — with
GitHub Actions
Inactive
Contributor
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
@accounter/client |
0.1.0-alpha-20260722150420-ec76c562e791e234601249ebec730d137ee85c37 |
npm ↗︎ unpkg ↗︎ |
@accounter/gmail-listener |
0.1.3-alpha-20260722150420-ec76c562e791e234601249ebec730d137ee85c37 |
npm ↗︎ unpkg ↗︎ |
@accounter/israeli-vat-scraper |
0.1.13-alpha-20260722150420-ec76c562e791e234601249ebec730d137ee85c37 |
npm ↗︎ unpkg ↗︎ |
@accounter/modern-poalim-scraper |
0.10.7-alpha-20260722150420-ec76c562e791e234601249ebec730d137ee85c37 |
npm ↗︎ unpkg ↗︎ |
@accounter/scraper-app |
0.0.3-alpha-20260722150420-ec76c562e791e234601249ebec730d137ee85c37 |
npm ↗︎ unpkg ↗︎ |
@accounter/server |
0.2.0-alpha-20260722150420-ec76c562e791e234601249ebec730d137ee85c37 |
npm ↗︎ unpkg ↗︎ |
@accounter/shaam-uniform-format-generator |
0.2.7-alpha-20260722150420-ec76c562e791e234601249ebec730d137ee85c37 |
npm ↗︎ unpkg ↗︎ |
@accounter/shaam6111-generator |
0.1.9-alpha-20260722150420-ec76c562e791e234601249ebec730d137ee85c37 |
npm ↗︎ unpkg ↗︎ |
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.
No description provided.