Skip to content

Open in half the time - #16

Merged
dhh merged 1 commit into
masterfrom
faster-start
Nov 16, 2026
Merged

dhh merged 1 commit into
masterfrom
faster-start

Conversation

@dhh

@dhh dhh commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Checkmate took 1.5 to 1.9 s to show its first frame, on every launch rather than only the first. Almost all of it was the GUI thread working before the window had anything to draw.

What was slow

  • Sculpting, one figure at a time. A set's figures took 0.5 to 0.8 s to generate, serially.
  • Sculpting figures nobody asked for. SculptGeometry rebuilt in its constructor and again on each of its four properties, so with Moss & Myth selected it first cast Orbital parts for the defaults.
  • 98 textures. Every square and every piece made its own 256×256 procedural texture, each computed twice (default style, then the real one): 0.19 s, and 98 uploads on the first frame.

What changed

  • A cast set's 24 parts are generated in parallel with QtConcurrent the first time one is wanted; Moss & Myth carves its six figures on six threads.
  • A geometry declared in QML builds once, in componentComplete. One made in code builds on its first setter.
  • Each surface style is computed once and cached.
  • The scene shares two Textures (the set's surface and Atelier's pale wood) between all squares and pieces.

Measured

Launch to first full frame on a Radeon 8060S, cold shader and QML caches, isolated save:

Set 0.1.1 This branch
Orbital Orders 1.46 s 0.75 s
Moss & Myth 1.86 s 0.54 s

Time before the window gets a render context went from 0.89–1.52 s to 0.22 s. What remains is the first frame itself (0.33–0.53 s), which I did not profile; shader compilation, the light probe and supersampling are the likely parts.

bin/test passes. I compared the four sets' look only through the existing tests, not side by side by eye; the shared textures hold the same data as before.

🤖 Generated with Claude Code

Before the window had anything to draw, the GUI thread sculpted the set
one figure after another and computed 98 textures, each twice. A set's
figures are now cast side by side on every core, a geometry declared in
QML is built once rather than once per property (which also sculpted an
Orbital pawn nobody asked for), each surface is computed once, and the
scene shares two textures between every square and piece.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

This PR reduces startup work by:

  • Piece meshes wait for their settings and set figures are sculpted in parallel.
  • Board squares and pieces reuse the scene’s surface textures.

No actionable issues were found. Tests were not run during this review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[QML properties set] --> B[Geometry completes]
  B --> C{Cached geometry?}
  C -->|Yes| F[Upload geometry]
  C -->|No| D[Build set parts in parallel]
  D --> E[Cache generated geometry]
  E --> F
  G[Cached surface data] --> H[Shared scene textures]
  H --> I[Board squares and pieces]
Loading

Reviews (1) · Last reviewed commit: "Open in half the time" · Reviewed by Greptile

@dhh
dhh merged commit 707e70f into master Nov 16, 2026
2 checks passed
@dhh
dhh deleted the faster-start branch November 16, 2026 13:33
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