You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-11-10] [Performance] Web: load decorative SVG backgrounds on demand instead of shipping them in main #104901
On web, every SVG import compiles into a React component and ends up in the chunk that imports it. Nine large decorative backgrounds are imported statically, so all of them ship in main-*.bundle.js, which every page needs before NewDot can render:
the ice cream background of the early renewal offer page, light and dark
the 6 colour patterns of eReceipt tiles (EReceiptBGs.ts), shown behind card expenses without a receipt, per diem expenses, receipt files that are not images, and the MFA card authorization page
the background of the distance eReceipt (DistanceEReceiptPanel)
Together they are 593 kB of JS in main (141 kB brotli), which is 12.6% of main. None of them shows on the screen a user lands on, and many users never open these screens. Main gets a new content hash on almost every deploy, so returning users download these bytes again after each deploy.
Solution
On web, load each background with React.lazy(() => import(...)) inside <Suspense fallback={null}>, the same pattern SignInPageLayout/BackgroundImage uses for the sign-in background. Each SVG becomes its own async chunk, which is not requested during the initial load. The service worker precaches it after the page loads. If a chunk fails to load, the screen renders without the pattern and nothing else changes.
Native keeps the static imports in EReceiptBGs.native.ts, because Metro resolves an .svg import to an asset id and there is nothing to split.
Impact
Local staging builds of main and the PR branch, Chrome, cold load (empty HTTP cache, no service worker), 5 interleaved runs per build:
changed the title [-][Performance] Web: load decorative SVG backgrounds on demand instead of shipping them in main[/-][+][Due for payment 2026-11-10] [Performance] Web: load decorative SVG backgrounds on demand instead of shipping them in main[/+]on Nov 3, 2026
Btw, i have reached out to you in Slack couple of times about ND payments and didn't get any response 😭, so i send message to email for contributors, do you have access to it?
Activity
melvin-bot commentedon Oct 23, 2026
@mountiny — to hire @Eskalifer1 on Upwork, add the External label so a job is created and the offer is sent automatically.
[-][Performance] Web: load decorative SVG backgrounds on demand instead of shipping them in main[/-][+][Due for payment 2026-11-10] [Performance] Web: load decorative SVG backgrounds on demand instead of shipping them in main[/+]13 remaining items
melvin-bot commentedon Nov 9, 2026
Payment Summary
Resolving PRs:
Lazy-load decorative images #104857
Assignee: @Eskalifer1 requires payment (Needs manual offer from BZ)
Reviewer: @aimane-chnaif owed $175 via NewDot
BugZero Checklist (@mallenexpensify)
aimane-chnaif commentedon Nov 10, 2026
Perf issue. No need checklist
melvin-bot commentedon Nov 12, 2026
@mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
mallenexpensify commentedon Nov 13, 2026
Claude posting on behalf of Matt:
Ready. Job price: $175 (standard, created 2026-10-23, no Help Wanted).
No deploy blockers or regressions on the issue or the PR.
aimane-chnaif says a performance issue needs no checklist: comment
Next: pay. No Caps+Y.
Evidence
PAYPREP v1mallenexpensify commentedon Nov 13, 2026
Payment Summary
Contributor: @Eskalifer1 paid $175 via Upwork
Contributor+: @aimane-chnaif due $175 via NewDot
Eskalifer1 commentedon Nov 13, 2026
Hi @mallenexpensify, this should be paid via Upwork.
Btw, i have reached out to you in Slack couple of times about ND payments and didn't get any response 😭, so i send message to email for contributors, do you have access to it?
mallenexpensify commentedon Nov 15, 2026
@Eskalifer1 can you please accept the job below? Please reply here and tag me once you have.
https://www.upwork.com/jobs/~022122005598113467441
I'll be in touch this coming week about NewDot payments, was a rough week last week.
Eskalifer1 commentedon Nov 15, 2026
Hi! I have accepted, thank you!
I will message you tomorrow via Slack, thank you!
mallenexpensify commentedon Nov 16, 2026
@Eskalifer1 paid, summary updated above. Thx.