Repository navigation
0.27.3: the tables of attenuated directories in .bss — 141,824 bytes fewer in every program that links them - #61
Open
Sunrisepeak wants to merge 1 commit into
Open
Sunrisepeak wants to merge 1 commit into
Sunrisepeak wants to merge 1 commit into
Conversation
…fewer in every program that links them The table of handles (4,096 entries of 32 bytes) and the table of roots (64 of 168 bytes) began with members initialised to -1, so both were placed in .data: every program that links the attenuation carried 141,824 bytes in its file and loaded them, whether it attenuated a directory or not. A free entry and a free root are now all zero bytes (an entry in use by its `used` flag, a root by `live` as before), and each is given its values where it is made (new_entry, new_root): both tables lie in .bss. The conformance tests pass unchanged (24 programs); in openkal_0_23's program both symbols move from `d` to `b`.
Sunrisepeak
added a commit
to Sunrisepeak/mui
that referenced
this pull request
Nov 26, 2026
… 1,835,968 B (within 2 MB) The day's measurement after the size check builds the tiers as the terminal design states them (the `small` profile) and this line's cuts; the bars are unchanged (1 MB, 2 MB). - check size --native (bytes loaded, small profile: -Oz, NDEBUG, the system's libstdc++): tests/size/terminal 1,047,242 B — over 1,000,000 by 47,242 (1,215,758 at 1d69ab4 built the same way; 2,211,981 at -O3); tests/size/terminal-agent 1,835,968 B — within 2,000,000 (2,001,804; 3,849,938 at -O3). strip --strip-all: 1,053,440 and 1,846,336 B. Both link the 51 packages their budgets list. - The budgets' `why`: the cuts, what is left by owner and what would take it off (openkal-linux's tables in .bss, mcpplibs/openkal-linux#61: 10,752 B of the first tier and 141,824 B of the second; the theme's framework motion defaults and the view's pixel effects at slots; std::format; unwind tables). - The lead ledger: terminal.size.counter.program.bytes and .runtime.bytes, lines of 2026-11-27 at 8bd34cb — 1,053,440 B against FTXUI 0.3173x, ratatui 0.5908x, Ink's bundle 0.6448x (with Node 141x): behind; the lead pages regenerated (omui-devtools lead docs). - tests/size/README.md, tests/size/terminal's manifest, tests/bench/competitors/terminal/README.md: the profile and the numbers. Verified: on a pty (util-linux script, 60x20), Tab, Tab, Enter, Ctrl+C: both tiers draw "Count 0", write the cell "1" at row 2, column 9, move the focus brackets, leave the alternate screen, exit 0, nothing on stderr. Example 01 (check size --native, its row at the size profile as before): 18,112,667 B loaded, within 18,530,000, 89 packages, its installs as listed. mcpp build --profile ci -p showcase/fighting -p tests/bench: built. lint 0, lint --self-test 55/55, docs --check, lead check.
Sunrisepeak
added a commit
to Sunrisepeak/mui
that referenced
this pull request
Nov 26, 2026
…no JSON parser: 493 -> 420 KB Scope: mlibs.json and omui.entry.launcher. - mlibs.json: its scanner (the one locate walks) checks RFC 8259's grammar and says why it stops; Scan::read/text/texts/problem read a few values of a text in place, nothing built and nlohmann's parser not linked; quote() writes a string as nlohmann's dump does. Document::problem and Scan::problem place a pointer the same way (one function). Additive interface (api.omui.txt). - omui-launch: runtime.json read through Scan, --which written with quote(): nlohmann no longer linked (its package stays in the graph through mlibs.json, 0 bytes); its lines written through mcpplibs.os's stdio instead of std::cerr; its dist profile -Oz (-Os was 4,096 B more stripped). - size.budget.xdef.json beside it: program.shipped <= 200,000 B at the `small` profile, its links. Measured (small profile, -Oz, omui-gen size, loaded bytes): at f6145e0 493,062 (505,664 stripped); Scan -71,652; stdio -1,706: 419,704. Left: openkal-linux's tables 141,824 in .data (mcpplibs/openkal-linux#61, open); toml++ 76,998 (probe without it: 344,412, so 202,588 with #61); std 76,506 (std::format's engine and Unicode tables, used by mcpplibs.os and cmdline too). The manifest's TOML reader is a decision: no TOML reader in the tree but toml++, and no JSON snapshot of an application's manifest exists. Evidence: mcpp test mlibs.json 8 cases (3 new: acceptance held to nlohmann on 47 texts at the grammar's edges, values in place and their problems placed as Document places them, quote round-trips through nlohmann); launcher 5 cases; omui.core core/json_test 5 cases (json_location walks the same scanner); devtools builds (ci); check size --native -p omui.entry.launcher --budget: 419,704 B over 200,000 (exit 1, the red); lint 0, self-test 55 of 55; docs --check 0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The table of handles (
g_entries: 4,096 entries of 32 bytes) and the table of roots (g_roots: 64 of 168 bytes) insrc/rights.cppbegan with members initialised to -1 (no descriptor, no root, no record), so the compiler placed both — 141,824 bytes — in.data. Every program that links the attenuation carried them in its file and loaded them, whether it attenuated a directory or not.A free entry and a free root are now all zero bytes: an entry is known to be in use by its
usedflag, a root byliveas before, and each is given its values where it is made (new_entry,new_root). Both tables lie in.bss.mcpp test: 24 programs, 24 cases pass. Inopenkal_0_23's program both symbols move fromd(.data) tob(.bss);nm -Sbefore and after.tests/size/terminal-agent, which links openkal-linux 0.26.3 through mcpplibs.os) carries both tables in.data— 141,824 bytes of its 1,980,368 loaded at-Oz; the first tier carriesg_roots, 10,752 bytes.