Skip to content

Improve/postage api optimization - #1881

Open
oraimoitel wants to merge 3 commits into
Stellar-Mail:mainfrom
oraimoitel:improve/postage-api-optimization
Open

Improve/postage api optimization#1881
oraimoitel wants to merge 3 commits into
Stellar-Mail:mainfrom
oraimoitel:improve/postage-api-optimization

Conversation

@oraimoitel

Copy link
Copy Markdown

closes #948

kryputh and others added 3 commits July 25, 2026 19:09
Expand unit tests for filterAuditEvents, hasActiveAuditFilter,
formatEventAsText, and CATEGORY_FOR_KIND from 7 to 21 tests.

Add Playwright E2E spec covering event rendering, category
filtering, search, empty states, copy/export buttons, and count.
Add regression coverage for audit log feature
Closes Stellar-Mail#964
Hotspot identified: MemoryApiRepository.incrementCounter() allocated
3 temporary arrays per call (spread-copy, Array(n).fill, filter).
Called 5x per submitPostage request = 15 arrays per request.

Changes:
- memory-repository.ts: Replace 3-array incrementCounter with
  single-pass push loop, eliminating all intermediate allocations.
- postage-service.ts: Extract buildQuoteResult() to deduplicate
  identical recordAuditEvent calls in both quote branches.
@kryputh

kryputh commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Please add proper PR description

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.

[Existing app][Postage API] Trim render work and loading latency

2 participants