Skip to content

-measure: phases nest, every step of a map build is measured, the parts add up - #1452

Merged
Frotty merged 1 commit into
masterfrom
claude/measure-nesting
Oct 13, 2026
Merged

Frotty merged 1 commit into
masterfrom
claude/measure-nesting

Conversation

@Frotty

@Frotty Frotty commented Oct 13, 2026

Copy link
Copy Markdown
Member

-measure showed totals which its steps did not add up to, and no type check.

Nesting. TimeTaker.Recording kept one open phase: beginning a phase ended the open one. A phase inside another (flatten in eliminate tuples, Importing files in Injecting map data) ended its parent, the parent's endPhase was then ignored, and the rest of the parent was counted nowhere. Phases and measured steps nest now: endPhase ends the innermost open phase (an end with no phase open in the current step is ignored, so it cannot end the step), and a step ends the phases left open inside it. The report shows each step under the one it ran in, and a (not measured) line for what the steps of a level do not account for, so the parts add up to the total. The total runs from the creation of the request instead of the first phase.

Coverage. Measured now: Load project (CLI, through the request's recorder), Replace map script, Typecheck project with map script and Typecheck program (the two checks), Copy model, Prepare cached map, Rebuild project, Transform program to Jass/Lua, Print Jass/Lua, run compiletime functions (the runner itself), Write requested script, Copy output map, Finalize map. In the compiler, the vararg elimination is its own phase (an endPhase without a phase stood there), froptimize ends, and translate to jass has its parts as phases (remove empty package inits, remove garbage, call relations, print IM as Jass). The build pipeline prints the report too, not only a run.

On a large map the report covers all but about 0.7 s of a 48.7 s build; before, about 6 s of the top level and parts of several phases were missing.

TimeTakerTests covers a phase inside a phase, a step ending phases left open in it, a stray end, and the not measured line. Run locally: TimeTakerTests, MapCancellationTest, CliBuildMapTests, CompiletimeTests, IncrementalModelOracleTests, MapRequestPatchTargetTests, OptimizerTests.

…ts add up

TimeTaker.Recording kept one open phase: beginning a phase ended the open one,
so a phase inside another (flatten in eliminate tuples, importing files in
injecting map data) ended its parent, and the parent's end was then ignored.
Phases and measured steps nest now, an end ends the innermost open phase, a
step ends the phases left open in it, and the report shows each step under
the one it ran in with what the steps of a level do not account for. The
total runs from the creation of the request.

Measured now: loading the project (CLI), replacing the map script, both type
checks, the model copy, the cached map, the transformation and printing of the
program, the compile-time runner, writing the requested script, copying and
finalising the output map. The Jass translation has its parts as phases, the
vararg elimination its own phase, and froptimize ends. A build prints the
report too.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T09:03:06.206120Z 652a022 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 652a0220e8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Frotty
Frotty merged commit caef1bd into master Oct 13, 2026
2 checks passed
@Frotty
Frotty deleted the claude/measure-nesting branch November 25, 2026 08:53
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