Skip to content

Finance: seed its demo file in one transaction (makepad#130 stacked) - #554

Merged
ymote merged 2 commits into
mainfrom
feat/finance-seed-runtime-patch
Oct 21, 2026
Merged

ymote merged 2 commits into
mainfrom
feat/finance-seed-runtime-patch

Conversation

@ymote

@ymote ymote commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Ships OctoSense-org/makepad#130 as the 39th stacked runtime patch: Finance seeds its demo file in one transaction, so its first open no longer freezes.

Why

The first open of Finance from OctoSense froze the UI for about 2 s. The shell log's ui-hang sampler showed makepad_sqlite journal create, fsync and unlink under makepad_finance::db::insert_transaction_on ← Backend::start. On an empty file, Finance seeds a generated household, about 1,570 transactions plus accounts, categories, payees, splits and budgets, committing every row on its own on the UI thread.

What changes

  • tools/runtime-patches/makepad-finance-seed.patch: makepad#130's diff (apps/finance/src/db.rs, native.rs). Those two files are identical in fork main and in this overlay, so it applies as is.
  • runtime-patches.lock.json:
    • the stacked entry (39th, after Maps: render driving tiles and 3D buildings above host backgrounds #435's makepad-map-texture-depth.patch) with its sha256;
    • the overlay tree moves from main's e7560180 to dafa5734, computed with git apply --cached on a temp index. It differs from main's only in those two files, and octosense-org-cd's independent replay of the whole stack from d653bc44 gave the same tree;
    • a product_fixes line.

Testing

  • python3 tools/setup.py (after resetting the old overlay, which was exactly the previous lock tree), then python3 tools/setup.py --check: passes on dafa5734.

  • cargo test --manifest-path .sources/makepad/Cargo.toml -p makepad-finance --lib on the patched overlay: 58 passed.

  • In makepad#130, the first-start test went from 1.8–3.3 s to 0.29 s in release.

  • End to end on macOS: Finance built in release from this overlay (cargo build --release --manifest-path .sources/makepad/Cargo.toml -p makepad-finance --bin finance), started standalone and hidden (MAKEPAD_HIDE_WINDOWS=1) in an empty directory so it seeds a fresh file. Every log line is timestamped from launch, and the run quits over the control port. Before is a release build of the same app from the previous overlay, without the fix:

    First start, runs 1 / 2 UI freeze ([ui-hang]) Demo file created at
    before 1450 ms / 1456 ms 1.62 s / 1.54 s
    after 377 ms / 321 ms 1.22 s (first exec of the new binary) / 0.40 s

    The remaining ~0.3 s is generating, inserting and loading the household on the UI thread. Moving Backend::start off it would remove that too, but that's a larger change to the app and not part of this PR.

Merge order

makepad#130 merges into fork main first. This and #546 both append to the stack; whichever lands second goes after the other. The patches touch disjoint files, so the combined tree is the same in either order (a9c02164, replayed by octosense-org-cd).

🤖 Generated with Claude Code

ymote and others added 2 commits October 21, 2026 09:53
Finance's first open froze the UI for about 2 s: an empty file is seeded
with the generated household one committed row at a time, each with its
own journal and sync, on the UI thread. OctoSense-org/makepad#130 seeds
it in one transaction (the first-start test: 1.8-3.3 s to 0.29 s in
release). Stacked as the 38th runtime patch until the next sweep; the
overlay tree moves 90b364c1 -> c4cc8f6f (only apps/finance changes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main gained a 38th stacked runtime patch (makepad-map-texture-depth,
#435). Finance's patch is now the 39th, after it; the overlay tree moves
e7560180 -> dafa5734 (only apps/finance changes; cross-checked with an
independent replay).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ymote
ymote merged commit 24c0dd7 into main Oct 21, 2026
8 checks passed
ymote added a commit that referenced this pull request Oct 21, 2026
#554 stacked makepad-finance-seed.patch as the 39th patch. The Android
buffer-stuffing patch follows it as the 40th, unchanged (sha 7f87b527); the
two touch disjoint files. The makepad tree, replayed over the whole stack
with git apply --index, is a9c02164. `tools/setup.py --check --cargo` passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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