Skip to content

perf(nostrand): ship own namespaces as DLLs and stop *load-paths* accumulating roots - #184

Merged
parth-io merged 3 commits into
flybot-sg:developfrom
parth-io:fix/nostrand-load-path-and-compile-dlls
Sep 18, 2026
Merged

parth-io merged 3 commits into
flybot-sg:developfrom
parth-io:fix/nostrand-load-path-and-compile-dlls

Conversation

@parth-io

@parth-io parth-io commented Sep 18, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #183, Closes #182

  • nos loads its eight namespaces from committed nostrand.*.clj.dll instead of recompiling them at every startup, taking nos version from 4.8s to 2.2s with a deps file and 3.8s to 1.3s without. NostrandMain.csproj stops copying nostrand/**/*.clj into the output.
  • refresh/nostrand regenerates those DLLs, exposed as bb refresh-nostrand, run after dotnet build in bb build and bb build-runtime, and added to bb check-drift
  • Drops full-aot and Scripts/aot-assemblies.sh as they were unused.
  • *load-paths* holds each root once, and set-load-path drops roots it no longer names.

Only caller was Scripts/aot-assemblies.sh, itself reachable only from a
PostBuild target commented out in NostrandMain.csproj. bb refresh-nostrand
replaces it.
@parth-io
parth-io requested a review from skydread1 September 18, 2026 03:04
@parth-io
parth-io force-pushed the fix/nostrand-load-path-and-compile-dlls branch from ce52cc0 to 95e28dc Compare September 18, 2026 05:01
Comment thread docs/bootstrap.md Outdated
Comment thread CHANGELOG.md Outdated
@skydread1

Copy link
Copy Markdown
Member

Two follow-ups outside the diff, both created by this change.

README.md:135 still says "73 DLLs, the compiler and stdlib Nostrand loads at startup". The four files under docs/ moved to 81, this one did not, and the line also needs nostrand's own namespaces named.

CONTRIBUTING.md, the paired bootstrap refresh section lists the triggers as "a stdlib or compiler .clj edit, or a C# runtime change that alters what the compiler emits". After this PR an edit to nostrand/nostrand/**/*.clj re-emits committed DLLs and needs the same paired commit, so it belongs in that list.

One question, not a change request: why is refresh-nostrand in bb build? build-runtime and check-drift already cover it, and as written bb build regenerates 8 of the 81 while the stdlib 28 wait for check-drift.

nos compiled its eight namespaces into memory at every startup; shipping
them as nostrand.*.clj.dll saves a few seconds per invocation.
NostrandMain.csproj no longer copies the .clj sources.
@parth-io
parth-io force-pushed the fix/nostrand-load-path-and-compile-dlls branch from 95e28dc to 4111c18 Compare September 18, 2026 07:27
@parth-io

Copy link
Copy Markdown
Collaborator Author

@skydread1

README.md

  • Fixed the 73
  • Added a line about using refresh-nostrand

CONTRIBUTING.md

  • Added the note about nostrand/nostrand/**/*.clj as suggested

bb.edn

  • Removed nostrand-refresh as mentioned, since check-drift covers it

bb/magic/drift.clj

  • Updated the docstrings to mention that refresh-nostrand can also cause drift

@skydread1
skydread1 self-requested a review September 18, 2026 07:57
@parth-io
parth-io merged commit 8173003 into flybot-sg:develop Sep 18, 2026
1 check passed
@parth-io
parth-io deleted the fix/nostrand-load-path-and-compile-dlls branch September 18, 2026 08:02
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.

nos recompiles its own namespaces upon startup. *load-paths* fills with duplicate roots.

2 participants