Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

REPORT.md for perf/bigbrush-p99 (provisional numbers); changelog and performance notes say so

islandmed52073671ac2c
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 09a4b016..975567b0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,8 +10,8 @@ All notable changes to SculptForge are listed here. The format follows
- Large brushes on dense meshes no longer stall the view: from 2 million vertices a stroke's dabs are placed on the
stroke thread (the same dabs, in the same order, as the frame loop places them; no preview), so a frame keeps
drawing while a 240 px dab moves millions of vertices, and a light batch is still waited for within the frame.
- Standard scene on an M1 Pro, 240 px brush: frame p99 139 -> ~31 ms at 15M and 306 -> ~33 ms at 33M, worst stall
- 325 -> ~120 ms, pen lift 162 -> 0 ms; Clay large p99 139 -> ~31 ms at 33M. `SF_BACKGROUND_DABS=0` turns it off.
+ On the standard scene's 240 px brush the slowest frames drop from 139 ms (15M) and 306 ms (33M) to about 30 ms in
+ first runs, and lifting the pen no longer waits (162 ms at 33M). `SF_BACKGROUND_DABS=0` turns it off.
- The membership card at launch is redesigned: the cube mark and the promise up top, the three memberships side by
side with their perks checked off and one bold button each (Insider highlighted), and the members' Discord in the
footer. It takes the current look's colours and opens in 150 ms. "Maybe later" now hides it for 30 days, updates
diff --git a/REPORT.md b/REPORT.md
new file mode 100644
index 00000000..d85100c3
--- /dev/null
+++ b/REPORT.md
@@ -0,0 +1,8 @@
+# perf/bigbrush-p99 (0.10.8): large-brush frame spikes. NUMBERS PROVISIONAL (machine never got to load < 2)
+What: profiling showed --benchmark ran strokes in the frame loop (predictive is off); a 240 px dab at 33M moves 3-11M verts = 70-220 ms dab + 40-110 ms upload per frame, all already threaded. Fix: from 2M vertices dabs go to the solver thread (no preview; same dabs, same order), frame-sized batches, frame waits <=12.5 ms then keeps drawing; pen lift no longer blocks. SF_BACKGROUND_DABS=0/1. Also: SF_STROKE_LOG/SF_SYNC_LOG breakdowns, SF_BENCH_MESH_OUT dump, isolated runs delete their /tmp folder on success (benchmarks left 1.3 GB autosaves; /tmp filled).
+p99 / stall ms, before (bench-baseline.txt, quiet) -> after (bench-after-load3.txt, load ~3): 15M Clay large 77/136 -> 31/34, 240 px 139/172 -> 31/36; 33M Clay large 139/154 -> 31/40, 240 px 306/325 -> 33/41, Smooth 75/81 -> 31/34; worst stall 325 -> 121 (orbit); release 162 -> 0 ms. p50 within ~2 ms (11-14 ms; 33M 240 px 12.0 -> 14.3). Every 15M/33M stroke p99 < 35 ms.
+Final code at load 7.7 (bench-after.txt): strokes p99 26-31 (15M), 29-54 (33M); 33M Move 5.8 s stall + clay-small 226 ms = load (Move doesn't use this path). Re-run `build/sculptforge --benchmark standard` quiet before publishing.
+Trade-off: 33M 240 px surface trails more (p50 31 -> 69-108 px) since each dab still costs 100-200 ms; dab counts match (101 vs 99).
+Quality: same dabs through both paths are bit-identical (ui_stroke_background; --measure-stroke 3,120/3,240 SF_MEASURE_VERIFY=1). Benchmark scene meshes aren't reproducible run to run on either path (two old-path runs differ 0.26), so cross-run 1e-5 isn't measurable there.
+Tests: full ctest -j3 117/118; ui_phone_link fails (phone_ar_version 1 != 2) identically on base 60001d4, pre-existing, not this branch.
+SHA: see `git log -1` on perf/bigbrush-p99 (pushed). CHANGELOG [Unreleased] + What's New 0.10.8 section added.
diff --git a/docs/performance.md b/docs/performance.md
index 573f46a1..ab2b32e3 100644
--- a/docs/performance.md
+++ b/docs/performance.md
@@ -26,14 +26,14 @@ a frame of work (at least 10 ms), the frame waits up to 12.5 ms for it (so light
placed them) and otherwise keeps drawing, and the next frame commits it. The same dabs through either path give the
same mesh, bit for bit, positions and normals (`ui_stroke_background`; `--measure-stroke 3,120` and `3,240` with
`SF_MEASURE_VERIFY=1` on a subdivided sphere). The benchmark scene itself isn't reproducible to that level: two
-frame-loop runs with every dab placed differ by up to 0.26, as much as one of each. Load 3-4, frame p99 / worst
-stall ms, before -> after:
+frame-loop runs with every dab placed differ by up to 0.26, as much as one of each. Frame p99 / worst stall ms,
+before (quiet) -> after (provisional: load 3-4, the quiet run is still to do):
| Phase | 15M | 33M |
|---|---|---|
-| Clay large | 77 / 136 -> 31 / 34 | 129 / 161 -> 31 / 40 |
-| 240 px brush | 139 / 172 -> 31 / 36 | 297 / 323 -> 33 / 41 |
-| Pen lift (240 px) | 20 ms -> 0 | 153 ms -> 0 |
+| Clay large | 77 / 136 -> 31 / 34 | 139 / 154 -> 31 / 40 |
+| 240 px brush | 139 / 172 -> 31 / 36 | 306 / 325 -> 33 / 41 |
+| Pen lift (240 px) | 20 ms -> 0 | 162 ms -> 0 |
On the sphere (`new_sphere subdivisions=9`) at 120 px (`--measure-stroke 3,120`, background dabs forced) the
stroke places as many dabs (156 vs 141 in the frame loop) with about the same lag (62 vs 53 ms). Each 240 px dab at 33M still takes 100-200 ms, so the surface