The Wayback Machine - https://web.archive.org/web/20201128040908/https://github.com/mono/mono/issues/15908
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce size of MonoVM for .NET5 #15908

Open
marek-safar opened this issue Jul 30, 2019 · 4 comments
Open

Reduce size of MonoVM for .NET5 #15908

marek-safar opened this issue Jul 30, 2019 · 4 comments

Comments

@marek-safar
Copy link
Member

@marek-safar marek-safar commented Jul 30, 2019

We can build much smaller Mono runtime for .NET Core purposes by simply removing code we don't need in this configuration. We did a few easy initial steps but we can go much further.

This list is not comprehensive but parts like

  • Culture Data
  • Any PAL related code
  • Unused icalls
@marek-safar marek-safar added this to Backlog in Short Term Projects via automation Jul 30, 2019
@CoffeeFlux
Copy link
Member

@CoffeeFlux CoffeeFlux commented Jul 30, 2019

There are a ton of icalls that have no prototype on netcore and raise a warning as a result, at least when building for OSX, and any efforts to clean that up would be greatly appreciated.

@jaykrell
Copy link
Collaborator

@jaykrell jaykrell commented Jul 30, 2019

For every warning you can #if netcore out the function, and what it uses, if there is no other use.

Or you can just squash the warning. Imho it isn't actually a useful warning.
The warning should only occur on the use, not the implementation, and if there is no use, as there isn't, then no warning.

And let the static linker do its job. It removes dead code well.
I don't see this actually making the runtime smaller, and it will mean that building for netcore gets less coverage of building for regular.
If regular is to be deleted in time then the #if helps that later effort.

@jaykrell
Copy link
Collaborator

@jaykrell jaykrell commented Jul 30, 2019

Part of the point being, is that #if to remove code and other purposes is overused.
The code is often removed anyway by the static linker, and this means that building for configuration X fails to show errors from configuration Y.
It is better imho to if.
Many people agree, but not around here.
We should check if netcore is already smaller, i.e. due to icall-def-netcore.h.

@EgorBo
Copy link
Member

@EgorBo EgorBo commented Jul 31, 2019

@marek-safar marek-safar moved this from Backlog to In progress in Short Term Projects Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.