-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use custom loader instead of go/packages
Having a custom loader lets us reuse parsing and typechecking results from snapshot to snapshot, which speeds up large scripts considerably. Before, we were writing out the files between commands to work around overlay bugs, but that in turn was making the go command recompile things after every command. Even without the recompile, not invoking the go command at all after every script command will be a win. The time for "git generate" in CL XXX drops from 206s to 101s from not needing to do a snap.Write after each command, and it drops further to 35s from the cached loading. There's more to be improved -- too much is being loaded now. The custom loader also makes it easier for us to introduce new packages during rewrites, because we have a full copy of the package graph that can be updated. The custom loader also lets us more easily fix a few bugs where renaming was not finding all identifiers, especially in test packages.
- Loading branch information
Showing
18 changed files
with
1,960 additions
and
1,416 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.