Repository navigation
Conversation
Preprocessing now extracts each document's aliases and parameterized RuleSets before applying them, entity name checks share one helper, and Package lists its fish candidates in one place. No behaviour change.
With --incremental or SUSHI_INCREMENTAL=1, each file's import is cached by content hash with the aliases, RuleSets and duplicate names it used, and reused while those are unchanged. Export runs as before.
Contributor
Author
|
Closing for now. We'll reopen this as a proper stack of smaller, more bite-sized PRs once stacked PRs are enabled in this repo. |
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.
Description:
Part 2 of 3 of a stack for #544, on top of #1656. Every SUSHI run parses and imports every FSH file again, even when only one changed. This adds
--incremental, which reuses the import of each unchanged file. On its own the gain is modest, as export takes most of a build: in a large R5 IG (511 FSH files), a build goes from 16.8 s to about 14.1 s. Part 3 reuses exports, which is where most of the time goes.Until #1656 merges, this PR's diff includes it. The new work is the last commit: 6817cf2
Cause
As noted in #544, FSH has no imports and any definition can live in any file, so a file's import can depend on aliases, parameterized RuleSets and entity names from other files. SUSHI keeps nothing between runs, so it can't tell what is safe to reuse.
Fix
--incremental, orSUSHI_INCREMENTAL=1for callers such as the IG Publisher. The cache lives in<project>/.sushi-cache(with its own.gitignore), or inSUSHI_CACHE_DIR. Without the option, nothing changes.--preprocessed, the cache is not used, and an info line says so.SUSHI_INCREMENTAL,SUSHI_CACHE_DIRand the cache folder.Testing Instructions:
Run
sushi . --incrementaltwice; the second run reportsIncremental build: reused N of N files.Edit a file and run again: only that file (and files that depend on what it changed) is imported again.Related Issue:
#544