Skip to content

Commit

Permalink
enable composite and TypeScriptBuildMode
Browse files Browse the repository at this point in the history
  • Loading branch information
olmobrutall committed Nov 21, 2019
1 parent 83231fb commit f4ec624
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Signum.React/Signum.React.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TypeScriptToolsVersion>3.6</TypeScriptToolsVersion>
<TypeScriptBuildMode>true</TypeScriptBuildMode>
<LangVersion>preview</LangVersion>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<Nullable>enable</Nullable>
Expand Down
2 changes: 1 addition & 1 deletion Signum.React/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"jsx": "react",
"incremental": true,
"outDir": "./ts_out",
//"composite": true,
"composite": true,
//"noEmit": true,
"strict": true,
"baseUrl": ".",
Expand Down

2 comments on commit f4ec624

@olmobrutall
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typescript MSBuild times 25% to 50% FASTER with Project References

This commit (together with the ones in Extensions and Southwind) enabled Typescript Project References and BuildMode.

The idea is to teach Typescript compiler that there are three Typescript projects, and they don't need to be recompiled every single time if they haven't change.... more or less. You can learn more about this feature here

Looks like the compiler still needs to spend some time checking things, so not 0s for Signum.React rebuild, but it's substantially faster now (between 25% and 50%) when MSBuild.

Webpack is still transpile-only and as fast as before.

OLD Signum.React Signum.React.Extensions Southwind.React Total (All proyects)
Clean Build (delete ts_out) 44 69 61 184
Build Signum.React Change 6 16 11 34
Build Signum.React.Extensions Change 5 15 13 33
Build Southwind.React Change 6 11 13 29
No Changes 6 11 7 25
         
         
Project References Signum.React Signum.React.Extensions Southwind.React Total (All proyects)
Clean Build (delete ts_out) 49 64 31 153
Build Signum.React Change 9 14 8 31
Build Signum.React.Extensions Change 6 14 7 28
Build Southwind.React Change 4 12 9 26
No Changes 5 10 5 21
         
         
Project References Build Mode Signum.React Signum.React.Extensions Southwind.React Total (All proyects)
Clean Build (delete ts_out) 25 36 18 90
Build Signum.React Change 5 13 9 27
Build Signum.React.Extensions.Change 9 15 6 31
Build Southwind.React Change 3 9 8 20
No Changes 3 8 7 19
         
         
         
OLD (2) Signum.React Signum.React.Extensions Southwind.React Total (All proyects)
Clean Build (delete ts_out) 42 65 62 179
Build Signum.React Change 8 16 12 35
Build Signum.React.Extensions Change 5 16 11 32
Build Southwind.React Change 5 9 12 25
No Changes 4 11 6 21
         
         
Project References Build Mode (2) Signum.React Signum.React.Extensions Southwind.React Total (All proyects)
Clean Build (delete ts_out) 30 35 17 88
Build Signum.React Change 4 13 7 24
Build Signum.React.Extensions.Change 2 11 5 19
Build Southwind.React Change 2 7 5 15
No Changes 2 7 5 15
         
-- -- -- -- --
**Improvements % **        
Clean Build (delete ts_out) 36% 47% 72% 51%
Build Signum.React Change 36% 19% 30% 26%
Build Signum.React.Extensions.Change -10% 16% 54% 23%
Build Southwind.React Change 55% 20% 48% 35%

@MehdyKarimpour
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 🥇

Please sign in to comment.