perf(transform-ast): one kitchen-sink suite per version pair (~95s β ~12s) - #337
Merged
Merged
Conversation
Generate a shared fixtures.json manifest and five it.each suites instead of 1390 single-it files, each of which re-parsed generated.json and spun up six WASM parsers. Job time drops from ~95s to ~12s.
Contributor
π€ Devin AI EngineerI'll be helping with this pull request! Here's what you should know: β I will automatically:
Note: I can only respond to comments from users who have write access to this repository. βοΈ Control Options:
|
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.
Summary
@pgsql/transform-astwas the slowest CI job at ~95s, and essentially none of that was transform work.make-kitchen-sink.tsemitted one test file per (fixture file Γ version pair) β 278 Γ 5 = 1390 suites, each holding a singleit()over ~17 statements. Every one of those suites paid the same fixed cost at module scope:plus its own ts-jest compile and Jest module registry. Measured in isolation a single suite takes ~1.0s, of which the assertions are noise.
The generator now writes a shared manifest and five thin suites:
Same corpus, same assertions, same per-fixture test names in the report β 5 parser-set inits instead of 1390.
npx jestin the package: 95s β 12s, 1443 passed.Two related bits:
runFixtureTests([])logsno filters provided, skipping testsand returns green. The generator now skips zero-statement fixtures outright, and the manifest covers all 23,491 statements (previously 23,477) β which surfacedmisc/index-clause-ordering, added in fix(deparser): emit CREATE INDEX trailing clauses in grammar orderΒ #336 and never picked up by a transform-ast regeneration.NULLS NOT DISTINCTis PG15+, so those statements can't be parsed by the v13/v14 parsers; added the correspondingparserErrorsskip entries, matching the existingMERGE/pg18-*precedent.Link to Devin session: https://app.devin.ai/sessions/6e8bd0b058a944eeba4a3dbad12d8487
Requested by: @pyramation