perf(types-builder): reuse vjsf layout for compiledLayout export#44
Draft
BatLeDev wants to merge 1 commit into
Draft
perf(types-builder): reuse vjsf layout for compiledLayout export#44BatLeDev wants to merge 1 commit into
BatLeDev wants to merge 1 commit into
Conversation
A schema exporting both `vjsf` and `compiledLayout` compiled and serialized its layout twice. The vjsf compiler now exposes the serialized compiled layout via compileParts(), so cache it per locale during the vjsf export and reuse it for the compiledLayout export instead of compiling again. Output is byte-identical. Requires @koumoul/vjsf-compiler >=1.5.0 (compileParts); peer dependency bumped.
8cc1a84 to
13ad450
Compare
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.
A schema exporting both
vjsfandcompiledLayoutcompiled and serialized its layout twice. The vjsf compiler already produces the serialized compiled layout, so via its newcompileParts()thevjsfexport caches it per locale and thecompiledLayoutexport reuses it instead of compiling again. Output is byte-identical.Why: on portals
build-typesthe schema that exports both (page-config-simple) was ~half of the remaining build time, and its second compile+serialize was pure duplication (~7s).Heads-up: depends on koumoul-dev/vuetify-jsonschema-form#586 (adds
compileParts); the peer dependency is bumped to@koumoul/vjsf-compiler^1.5.0. Kept as draft until that compiler release is published so CI can install it and pass.