Repository navigation
Optimize the size for tsbuildinfo - #43155
Conversation
|
TypeScript Bot (@typescript-bot) pack this |
|
TypeScript Bot (@typescript-bot) pack this |
|
Heya Sheetal Nandi (@sheetalkamat), I've started to run the tarball bundle task on this PR at 41026d7. You can monitor the build here. |
|
Hey Sheetal Nandi (@sheetalkamat), I've packed this into an installable tgz. You can install it for testing by referencing it in your and then running There is also a playground for this build and an npm module you can use via |
Tobias Koppers (sokra)
left a comment
There was a problem hiding this comment.
Looks good, I noticed a few minor nitpicks for the test runner
|
I tried this version in my project. Total Size: 14.9MB -> 1.0MB
|
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
Andrew Casey (amcasey)
left a comment
There was a problem hiding this comment.
Can you please summarize the high-level changes? Pulling out numeric identifiers seems like an easy win - what else changed?
Andrew Casey (amcasey)
left a comment
There was a problem hiding this comment.
My review was somewhat shallow, but the explanation made sense and I didn't notice obvious bugs.
This is simplified version of #43079 and additional optimizations for
tsbuildinfosizeChanges are:
fileNames: new entry which is list of filenamestsbuildinfowill encounter, index of the file name is used asfileIdeverywherefileInfos: is now a list instead of map.FileFnfois for the file at givenfileIdas indexaffectedFilesPendingEmitalso usefileIdinstead of file namefileIdsthatreferenceMaporexportedModulesMapwill use. Index of this list will be used asfileIdsListIdfor reference mapreferenceMapandexportedModulesMapis converted to tuple array with first entry beingfileIdand second one beingfileIdsListIdtsbuildinfowith 2 space indent, its emitted without spacestsbuildinfoas areadable.baseline.txtso that we can verify correctness easily