4DBug
6e9790bf2a
extensions: submodule pointers -> the rewritten extension commits on their remotes (imcurveedit-luau 4998eaf, imgradient-luau 227f1a0, imgui-memory-editor-luau 8249fe2, imnodes-luau 357fc01, imsequencer-luau d09550e; same trees as the old 9769fd0 / 21b3b2d / 3c9aca1 / 363fd65 / a911077, which no longer exist upstream)
Build & Release / build (push) Canceled after 0s
2026-10-25 06:23:44 -05:00
4DBug
d1818970b5
0.4.4
...
Build & Release / build (push) Canceled after 0s
Performance update (Roblox), no API changes; pixels identical to 0.4.3.
- Raster: solid spans 4-8 px per loop iteration, full-width rows copied in blocks, bit32 colour unpacking (colorpicker -19%, implot -13%, fonts -16%)
- Raster: axis-aligned edges tested once per row / column, AA fringe rows with alpha 0 skipped, triangle / line quad spans from per-side edge slots, narrow spans (vertical lines, histogram bars) without row bookkeeping (plots up to -25%)
- ImPlot rect fills (heatmaps, bars) drawn as one primitive instead of two triangles (implot -3.5%)
- DirtyRects: greedy diff of a tile's old and new primitive list, so scrolling no longer redraws everything after the first shifted row (scroll: 14.1k -> 4.3k pixels rasterized per frame)
- Hover recolors skip tile hashing and redraw only the affected tiles; unrolled per-primitive vertex hash; per-command primitive data (CollectPrims -10%)
- Library: @native table layout functions, trunc helpers, ImDrawListSplitter:Merge() via table.move (demo -2..4% instructions)
- stb_truetype: CFF-only / font-init functions no longer @native, -312 KB native code (more headroom under Studio's native code budget)
- Fix: clicking right after the Studio/game window regains focus (without moving the mouse first) did nothing
- Extensions: submodules point at the current implot-luau, imguicolortextedit-luau, implot3d-luau and imguizmo-luau commits
- tests: t_recolor_pixels, t_scroll_pixels, native_size.py (native code budget check)
v0.4.4
2026-10-25 05:44:24 -05:00
4DBug
b83d09de0c
Roblox backend: forget the last mouse position when the window gains / loses focus (losing focus clears imgui's mouse to unavailable and NewFrame only resends a moved mouse, so a click on return without moving first landed nowhere); rebuilt build/ImGui.luau
2026-10-25 05:44:24 -05:00
4DBug
3bac70663f
build: rebuild Roblox bundle + worker (span slots, ImPlot rect pairs, greedy dirty-rect diff, per-command primitive data, table natives, trunc helpers)
2026-10-24 06:09:18 -05:00
4DBug
132660be9a
tools/test: t_scroll_pixels.luau (stress window with table + wrapped text scrolling down / up, resizing from the bottom-right and the top-left, composite every 3 frames: incremental must equal a forced full redraw; catches DirtyRects list-diff mistakes) + check_all.sh 'scroll_pixels' check
2026-10-24 06:06:32 -05:00
4DBug
7c21be04de
Roblox backend: a primitive's texture, texture id, vertex buffer and clip rect are its draw command's (PrimCmd -> Cmd* arrays, numbered through the frame) instead of 7 per-primitive arrays: CollectPrims writes 11 instead of 17 values per primitive, HashTiles / RasterRect / PrimHash / Parallel.Tile read them through PrimCmd (headless instructions per frame: implot -0.23M, plots -0.1M, scroll -0.09M, fonts -0.08M, resize -0.03M; CollectPrims -10%; pixels identical)
2026-10-24 05:55:53 -05:00
4DBug
8e6abeede9
Roblox DirtyRects: a greedy diff of the tile's old and new primitive list (lookahead 8 entries for the one that resyncs both, so an inserted or removed run is skipped; same flat rect: strips) instead of pairing them only by position when the counts match: a row scrolled out of or into a tile, or an entry shifted by one, no longer redraws every primitive after it. Any order-preserving pairing is exact. Two unpaired entries without a resync: the positional pass as before (mostly changed lists: new font size, animated plots) (headless: scroll PixelsRasterized 14.1k -> 4.3k/frame, Raster -25%, resize_tl 106k -> 82k px, resize 82k -> 78k px; instructions scroll -0.4M/frame, resize_tl -0.2M, others within +-0.1M; pixels identical)
2026-10-24 05:35:18 -05:00
4DBug
b119b07676
Roblox HashTiles: the per-primitive vertex hash unrolled (2 vertices for quads, 3 for triangles, 4 for line quads / triangle pairs; was a loop with a branch per vertex; same math, same order: hashes identical) (headless instructions: scroll -0.1M/frame, resize -0.06M; Hash stage -5..9% plots/implot)
2026-10-24 05:34:25 -05:00
4DBug
9ef8a623cc
tools/test/native_size.py: native code size of the bundle per module / source file / function vs the Studio limit (one script's native code must fit one ~4 MB block or none of it is compiled; measured in Studio: native at 4,083,418 bytes, interpreted from 4,103,258; master 3,153,274 = 77%, ~900 KB headroom); check_all.sh 'native' check; PORTING.md note
2026-10-24 05:33:08 -05:00
4DBug
ff7a04187c
Tables: @native TableUpdateLayout(), TableSetupDrawChannels(), TableSetupColumnFlags() (once per table per frame, the largest interpreted cost of table-heavy windows: demo_all -2.5% instructions; +176 KB native code, paid for by the stb_truetype trim; draw data identical)
2026-10-24 04:54:21 -05:00
4DBug
b87012f08f
stb_truetype: no @native on CFF-only functions (charstring interpreter, CFF index/dict parsing, cubic tesselation) and font-init-only ones (InitFont, table directory): never run per frame for TrueType fonts, native code -312 KB (Studio shares one native code budget across scripts); per-frame cost unchanged (fonts scenario instructions identical), startup -3% instructions (less to compile)
2026-10-24 04:54:21 -05:00
4DBug
ca621e1082
Trunc helpers: _Trunc/ImTrunc @native, ImTrunc64 its own hoisted function (was an alias of _Trunc: AddRect()/AddRectFilled() called a non-native function per rect), IM_TRUNC/IM_ROUND hoisted + @native; bundle.py: A's local budget counts the hoisted functions (main chunk stays under 200 locals) (demo_all -1.7% instructions; draw data identical)
2026-10-24 04:54:21 -05:00
4DBug
f2658b755e
ImDrawListSplitter:Merge(): copy each channel's indices with table.move() (upstream memcpy) instead of a per-index loop in interpreted code (stress hover -0.8% instructions; draw data identical)
2026-10-24 04:54:21 -05:00
4DBug
620660ccf9
Roblox backend: flat triangle pairs a b c + a b d (ImPlot PrimRectFill: heatmap cells, bars; one colour, one uv) are one primitive (kind 5): per row both triangles' spans exactly as DrawTriangle computes them, one fill where they touch (opaque: or overlap), else each in order; pairs DrawTriangle would walk by columns, or degenerate ones, still go to the two calls (tile hash kind field * 8; replay: implot -3.5%; randomized 800k cases vs the two DrawTriangle calls identical; pixels identical)
2026-10-24 04:30:29 -05:00
4DBug
5ae58c6b57
Roblox raster: narrow flat spans (opaque <= 8 px, translucent <= 4 px wide: vertical lines, histogram bars) skip the uniform-row bookkeeping and only mark pending damage; translucent ones blend per pixel (cached per destination value), one pixel wide in one loop down the column (replay: plots -13%, implot -3%, resize -2%; pixels identical)
2026-10-24 04:16:31 -05:00
4DBug
8520257086
Roblox raster: triangle / line quad spans from per-side edge slots (one estimate + short search per side, no per-edge branches per row; horizontal / vertical edges bound the row / column range once), line quad texels blended without the per-texel cache and opaque-texel branches (replay: implot -5%, plots -5%, colorpicker -2.5%; pixels identical)
2026-10-24 04:08:59 -05:00
4DBug
8611bfb4ed
build: rebuild Roblox bundle + worker (recolor patch, unrolled span/row writes, axis-aligned edge and alpha-0 edge skips)
2026-10-23 23:52:00 -05:00
4DBug
b3e9390653
extensions: submodule pointers -> the rewritten extension commits on their remotes (implot-luau 7199224, imguicolortextedit-luau a340940, implot3d-luau 6ff7fb1, imguizmo-luau a71a223; same trees as the old 2bc5700 / 0592ed6 / b30d2ff / 93f4569, which no longer exist upstream)
2026-10-23 23:51:47 -05:00
4DBug
752ae2e887
Roblox raster: vertex-colour triangles skip a row / column lying on an edge whose two vertices have alpha 0 (an AA fringe's outer edge sits on pixel centres; the interpolated alpha is exactly 0 there, so it drew nothing) (replay: plots -3%, resize -1.5%; pixels identical)
2026-10-23 23:41:50 -05:00
4DBug
c0fc18177f
Roblox raster: an axis-aligned edge (A = 0 for rows, B = 0 for columns) is tested once per row / column instead of per pixel by the span search: AA fringes and shaded fills next to a vertical / horizontal edge no longer scan empty rows / columns pixel by pixel (replay: implot -8%, plots -12%, resize -5%; pixels identical)
2026-10-23 23:39:02 -05:00
4DBug
5c076f65d5
Roblox raster: solid spans 4-8 pixels per loop iteration (FillRow; a native loop iteration costs more than a few writes), opaque column walks 4 rows per iteration, translucent black over opaque 4 pixels per iteration without the cache (colour picker SV square), full-width span rows copied in doubling blocks (CopyRows), bit32 colour unpacking instead of % / floor (replay in Studio: colorpicker -19%, implot -13%, fonts -16%; pixels identical)
2026-10-23 23:39:02 -05:00
4DBug
d1db51dded
Roblox backend: PatchDrawList skips primitives with no vertex in the listed vertices' offset range before the DriftSet lookups (hover recolor patch -25%, drift moves too)
2026-10-23 23:19:40 -05:00
4DBug
cef7a1209e
Roblox backend: recolored draw lists (same vertex positions, a few vertices' colour / uv changed, e.g. hover) skip HashTiles: CompareDrawList 4 lists them, PatchDrawList gives those primitives their real hashes (PrimHash / FlatTileHash) and redraws just their tiles, leaving the tiles exactly as the full path would; t_recolor_pixels (incremental vs forced, also parallel) in check_all
2026-10-23 23:19:40 -05:00
4DBug
951d18fda2
Roblox backend: HashTiles mixes the primitive kind into its bounds term instead of two extra % after the second vertex (gradient rects, ImPlot line quads; implot Hash -4%, same pixels)
2026-10-23 23:19:40 -05:00
4DBug
006c8c4a34
tools/test: prof.py finds run.py's linemap in $TMPDIR (tempfile.mkdtemp), not only /tmp
2026-10-23 22:32:53 -05:00
4DBug
23e31fcf3c
0.4.3
...
Build & Release / build (push) Canceled after 0s
Performance update (Roblox), no API changes; draw data and pixels identical to 0.4.2.
- Unchanged check: CompareDrawList reads vertices as f64 + col (3x fewer reads), moved lists shift their snapshot in place
- Collect/hash ~40% cheaper per changed draw list; DirtyRects without copies, skips unchanged prims at the same position
- Raster straight into the upload buffer (no CopySubRect; Upload -80..90%), uniform row intervals, faster glyph blits, pending damage rect, two-pixel span writes, inlined blends in gradient/interpolating triangles, tall flat triangles as spans
- Tiles: no 64 KB CPU buffer per tile, 4 prewarmed tiles in the free list; atlas record buffers reused on repack
- Fix: windows moved by whole pixels could keep stale pixels where trig-generated vertices drift by 1 ulp (t_move_pixels)
- Library: @native on hot helpers, fewer temporaries (Begin, widgets, tables, PlotEx, colour checkerboard), pooled ImDrawCmd / style / group stack entries (55 -> 31 KB/frame on the bench scene); faster glyph baking (repack O(n), vertical-edge fast path)
- backends/roblox/patches.lua: Luau-tuned RenderText/AddText/text-size cache hit (Roblox only)
- bundle.py optimization L: library-internal ImGui.Foo calls become locals (Roblox; hookable deny-list: Begin, End, TreeNode*, CollapsingHeader, ItemAdd, ItemHoverable, ItemSize, BeginTabItem, ShowDemoWindow; IMGUI_BUNDLE_NO_L=1 turns it off)
- Parallel: Actors free destroyed textures (leak), send only changed glyph rects
- Extensions: implot-luau (range renderers, tick reuse, @native per-point paths), imguicolortextedit-luau (widest line + selection cached), implot3d-luau, imguizmo-luau (@native math)
- LÖVE backend: RegisterCanvas()/UnregisterTexture(), ReadFile via love.filesystem root
- tests: t_move_pixels, t_scene_pixels, t_stress, t_stress2 + bench_scenes.luau
v0.4.3
2026-10-21 04:04:31 -05:00
4DBug
694d56a78f
LÖVE backend: ReadFile also tries the root as a love.filesystem path (works in .love/fused builds); RegisterCanvas()/UnregisterTexture() to show an existing Texture/Canvas without the backend owning it; rebuilt build/imgui_love.lua
2026-10-21 04:03:58 -05:00
4DBug
635cf6647b
build: rebuild Roblox bundle + worker (round 3: rasterizer gradients/lines, library plots/colour pickers/Begin temporaries)
2026-10-21 03:50:40 -05:00
4DBug
90efb0c6e1
extensions: imguicolortextedit-luau -> 0592ed6 (TextEditor: widest line + selected text cached, @native glyph loops), implot3d-luau -> b30d2ff, imguizmo-luau -> 93f4569 (@native per-point/math paths)
2026-10-21 03:50:31 -05:00
4DBug
6eb91d17e4
extensions: implot-luau -> 2bc5700 (round 3 ImPlot performance: range renderers, @native per-point helpers, tick reuse)
2026-10-21 03:35:40 -05:00
4DBug
dfdfea5ea7
Roblox backend: RasterRect tests a primitive's bounds against the rect before reading its clip (most of a tile's primitives miss a small dirty rect)
2026-10-21 03:35:32 -05:00
4DBug
c85b2dbb96
Roblox raster: solid spans written two pixels per writef64 (the pixel twice as a normal double; per pixel otherwise), translucent black spans without the colour terms (colour picker SV square), triangle / line quad rows start past an estimate that is never in the span (replay: colorpicker -13%, plots -7%, implot -5%; pixels identical)
2026-10-21 03:35:32 -05:00
4DBug
12059f2646
Roblox backend: DirtyRects skips AddRect for a changed primitive inside the first dirty rect (where AddRect would merge it, unchanged)
2026-10-21 03:35:32 -05:00
4DBug
d99864c315
Roblox raster: per-pixel blend/texel sample inlined in the interpolating triangle paths (rows and columns) and gradient kind 2 (a call per pixel cost more than the math), colours unpacked inline (shared when equal), white texels not folded, flat span constants only when translucent; line quads: bounds before edge setup, fixed texel row when v is constant; narrow solid spans written instead of copied per row (replay: colorpicker -14%, plots -14%, implot -3%; pixels identical)
2026-10-21 03:35:32 -05:00
4DBug
b2c8ce7a00
tools/test: t_scene_pixels (bench scenes animated, composited every 8 frames: incremental == forced redraw), in check_all (ImPlot scene when extensions/implot-luau is checked out)
2026-10-21 03:35:32 -05:00
4DBug
a2e19627fe
tools/test: hashes.sh finds luau/luajit in the nix store when the pinned paths are gone (like check_all.sh)
2026-10-21 03:00:35 -05:00
4DBug
278f978d3e
Library: fewer temporaries per window, child, input field, separator text and resizable table: Begin() skips CalcWindowAutoFitSize() when no axis auto-fits (result unused; still called when a size callback would see it), scalar scrollbar/auto-fit/avail/needed sizes, ScrollbarSizes updated in place, scratch viewport/visibility rects, OuterRectClipped and the previous-child overlap test without ImRects; RenderWindowOuterBorders() scratch corner; EndChild() scratch size/bb; InputTextEx() scalar label/frame/inner sizes, scratch total_bb and (single-line, until ItemAdd() accepts it) frame_bb, so clipped fields allocate nothing; SeparatorTextEx() scratch sizes/rect/positions; TableUpdateBorders() scratch hit rect
...
demo_all scene headless: 825 -> 553 KB/frame allocated (Begin 5.3 -> 1.4 KB per window, InputTextEx 0.8 KB -> 0 per
clipped field), user instructions/frame -1.3%. GC steps in that scene cost ~+1.5 ms on 2-4 frames per cycle, so
cycles get ~1/3 rarer. Draw data unchanged.
2026-10-21 03:00:23 -05:00
4DBug
30afa19ed1
Library: PlotEx() without per-point temporaries (scalar tp0/tp1 and ImLerp, two scratch corners only read by AddLine()/AddRectFilled(), scalar frame/inner/total rects) and @native; RenderColorRectWithAlphaCheckerboard() with scratch cell corners and @native; @native ShadeVertsLinearColorGradientKeepAlpha() and _PathArcToN() (color picker hue wheel)
...
plots scene headless --roblox (interleaved A/B): lib lowq ~0.35 -> ~0.27 ms/frame; colorpicker lib lowq ~0.43 ->
~0.38 ms/frame. Draw data unchanged (STRESS2HASH of all scenes, draw hashes).
2026-10-21 03:00:23 -05:00
4DBug
2ff5225f49
Library: @native on DebugNodeFontGlyphsForSrcMask() (the font atlas glyph grids: a 256-entry scan per codepoint block + 256 AddRect/RenderChar per open block) and on small helpers called from native code (IM_ASSERT, IM_ASSERT_USER_ERROR_RET, ImHashStr's memo, ImVector __index/push_back/pop_back/back/iter)
...
demo_all scene (whole demo open, headless --roblox, interleaved A/B): lib ~10.1 -> ~9.1 ms/frame, user
instructions/frame -5%; draw data unchanged.
2026-10-21 03:00:23 -05:00
4DBug
5fa9889a37
tools/test: bench_scenes.luau (plots, colorpicker, implot, demo_all scenes shared by the Studio bench and headless runs) and t_stress2.luau (library + backend time and draw checksum per scene)
2026-10-21 01:58:35 -05:00
4DBug
6f4ec3c2b7
build: rebuild Roblox bundle + worker (round 2: bundle-time ImGui.* localization, patches.lua, library allocations, backend raster/bookkeeping)
2026-10-21 01:29:48 -05:00
4DBug
701156b5cc
Roblox backend: reuse the destroyed atlas texture record's buffer for the next one of the same size (repack)
...
buffer.create of a 512 KB atlas costs ~0.1-1.8 ms in Studio (spiky); a repack creates one every few frames
in the font size scenario.
2026-10-21 01:24:28 -05:00
4DBug
086e66cb3e
Roblox backend: keep 4 prewarmed tiles in the free list (Heartbeat, one per call, never evicting)
...
A growing layer takes them instead of creating an EditableImage + ImageLabel mid-frame (~90 us per tile in
Studio vs ~7 us from the free list). GetTile: one path for new and recycled tiles (NewTile).
2026-10-21 01:24:28 -05:00
4DBug
162fa80075
Roblox raster: tall flat triangles (column walk) write spans like the row path (no BlendPixel call per pixel)
...
Opaque: direct writes; translucent: the row path's per-span constants + per-destination cache. Same math,
bit-identical (replay hash, t_pixels, t_composite, t_parallel). Replay: triangles ~13 -> ~9 ms, total -5%.
2026-10-21 01:24:28 -05:00
4DBug
31d09640bf
Roblox backend: DirtyRects skips primitives unchanged at the same list position (paired lists)
...
Every pixel such a primitive covers is either inside a changed primitive's rect or drawn by the same
primitives in the same order. Headless: 7% fewer pixels rasterized on resize, raster+upload -6..-9%.
2026-10-21 01:24:28 -05:00
4DBug
53b3489f68
Roblox backend: moved draw lists with drifted vertices: redraw just what they touch (and always redraw it)
...
A window moved by whole pixels often has a few trig-generated vertices off the exact shift by an ulp (when a
coordinate crosses a power of two): CompareDrawList fell back to the full Collect + Hash (~1/4 of moving
frames), and the tile hashes don't see an ulp, so those primitives were never redrawn (stale pixels vs a
forced redraw, e.g. a moving Bullet). Now CompareDrawList lists the drifted vertices; if all their floor /
ceil (CollectPrims' bounds) shifted too it returns 3: PatchDrawList keeps the tile lists (same primitive
sequence, checked) and marks only the drifted primitives' entries changed (DriftMark, new each frame), so
their tiles redraw just those rects. Otherwise the full path marks them the same way.
2026-10-21 01:24:28 -05:00
4DBug
2fc6d75ef8
tools/test: t_move_pixels (moving window with circles / rounded rects / bullets: incremental == forced redraw), in check_all
2026-10-21 01:24:28 -05:00
4DBug
f2648316e7
bundle.py: optimization L (Roblox): library-internal ImGui.Foo reads in function bodies become per-file locals ImGui_Foo (file function or a wrapper around it, within the 200 locals/upvalues limits), bound after every IM_INCLUDE; only names assigned once at load time, patchable deny-list (Begin/End/TreeNode*/CollapsingHeader/ItemAdd/ItemHoverable/ItemSize/BeginTabItem/ShowDemoWindow) stays a table lookup; IMGUI_BUNDLE_NO_L=1 turns it off
...
ImGui has ~1000 keys, so Luau's inline cache (hash slots < 256) missed most ImGui.Foo lookups. 722 names localized;
draw hashes identical, LÖVE bundle unchanged, IMGUI_BUNDLE_NO_L=1 reproduces the previous bundle byte for byte.
2026-10-21 01:20:39 -05:00
4DBug
328f13a3c4
Library: tables without per-instance temporaries in BeginTableEx()/TableUpdateLayout()/TableMergeDrawChannels() (scratch rects, scalar outer size); ImDrawListSplitter::Merge() keeps the command it merges away past Size for reuse (was 6 new ImDrawCmd per table per frame): 435 -> 247 tables/frame allocated for 10 small tables in a window
...
Draw data unchanged.
2026-10-21 01:14:31 -05:00
4DBug
f3387cfe76
Library: no temporaries in Checkbox()'s check mark, Bullet(), Dummy(), NewLine(), ArrowButton[Ex](), InvisibleButton(), MenuItemEx() and InputScalar()'s step buttons
...
Per widget headless: MenuItem 658 -> 119 B, Bullet 611 -> 0 B, ArrowButton 634 -> 7 B, Checkbox 74 -> 7 B, NewLine 112 -> 0 B, Dummy/InvisibleButton 448/673 -> 112 B (the caller's own ImVec2). Draw data unchanged.
2026-10-21 01:14:31 -05:00