Repository navigation
Turn on ReadyToRun - #12361
Turn on ReadyToRun#12361
ReadyToRun#12361Conversation
|
We should disable the crossgen, but only for our binaries... let me see if I can do this change... |
|
I need to do some testing. |
There was a problem hiding this comment.
It seems we should disable Start-CrossGen function.
There was a problem hiding this comment.
We should probably disable Start-CrossGen until we can verify PublishReadyToRun is a good replacement
There was a problem hiding this comment.
CrossGen and ReadyToRun are the same thing, well, it's a switch to crossgen.
There was a problem hiding this comment.
We can use set COMPlus_ReadyToRunLogFile=log.txt from issue I referenced above to check dll-s. Start-CrossGen does not create R2R dll-s.
There was a problem hiding this comment.
Ilya (@iSazonov) crossgen with a switch is what is used to generate readytorun binaries in the dotnet project
There was a problem hiding this comment.
And I switched us to that method, but per DotNet we need to use the csproj if we want our symbols to work: https://github.com/PowerShell/PowerShell/blob/master/build.psm1#L2217
There was a problem hiding this comment.
But can your explain why crossgen should be disabled on the rest of the binaries?
There was a problem hiding this comment.
I forgot that we also crossgen assemblies not part of the build that we include in the package. We should probably still crossgen those.
There was a problem hiding this comment.
This make sense for third-party assemblies. For PSReadline and MI we could move to R2R format.
Ilya (@iSazonov) crossgen with a switch is what is used to generate readytorun binaries in the dotnet project
With set COMPlus_ReadyToRunLogFile=log.txt logs show that after Start-CrossGen our dll-s are not initialized as R2R but with PublishReadyToRun are initialized.
34ce76f to
85fe743
Compare
| Write-Log "Run ResGen (generating C# bindings for resx files)" | ||
| Start-ResGen | ||
| } | ||
| # TODO: remove Start-ResGen after testing ReadyToRun |
There was a problem hiding this comment.
Please revert this change. This is the wrong PR
There was a problem hiding this comment.
Oops, sorry.
This reverts commit 948b5f8.
Ilya (@iSazonov) You reverted a commit and then applied the same commit again. |
| ) | ||
|
|
||
| # TODO: remove Start-CrossGen after testing ReadyToRun. | ||
| return |
There was a problem hiding this comment.
This isn't true, and we should still crossgen the un-optimized binaries.
Travis Plunk (TravisEz13)
left a comment
There was a problem hiding this comment.
Please address changes. I made ALL the needed changes the the crossgen function. Please revert back to my commit.
|
PoshChan-Bot (@PoshChan) Please remind me in 1 hour |
|
If we need to disable crossgen on the other assemblies, please submit a separate PR. Combining items in PRs makes it difficult if we need to backport. |
|
Travis Plunk (@TravisEz13), this is the reminder you requested 1 hour ago |
I have only question about PSRL and MI. We could make it readytorun in their repos. If yes I can open tracking issues. Thoughts? |
|
I think it's bad practices in publish the readytorun in the nuget. But I would open a new issue, and just be sure to ask that question. |
|
"At present, libraries can only be R2R compiled as part of an application, not for delivery as a NuGet package."
|
|
In our publish folder we get .Net dll-s in R2R format and trace shows this. If we compiled them locally into this format, then PSRL and MI would also be converted in it. Yes? It makes me think that we get them already in R2R format and I'd expect we could get PSRL and MI in R2R format too. |
|
🎉 Handy links: |
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
PR Summary
Turn on ReadyToRun for PowerShell dll-s.
We can use dotnet/runtime#35062 (comment) to check dll-s.
PR Context
Now all .Net dll-s is in ReadyToRun format and PowerShell distributive doubled in size. So we can turn on the feature too. It will add ~20Mb (10%).
Docs https://docs.microsoft.com/en-us/dotnet/core/whats-new/dotnet-core-3-0#readytorun-images
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.