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

Runtime and assembly issues #103

Open
BinToss opened this issue Feb 3, 2022 · 0 comments
Open

Runtime and assembly issues #103

BinToss opened this issue Feb 3, 2022 · 0 comments

Comments

@BinToss
Copy link
Member

BinToss commented Feb 3, 2022

Issues

NOTES

  • "RID" refers to a unique combination of OS and CPU architecture. See .NET RID Catalog.

File Size

Updates should be lightweight and have as few files as possible.

  • HXE.exe from release 2.1.4 is 128 MiB. If it targeted .NET 6 and used EnableCompressionInSingleFile, it would have been closer to 64 MiB which is still large for a console app with two WPF windows.
  • Our GUIs rely on WPF. ~20MiB per RID. Windows-only.
  • DotNet SingleFile wraps our app and assemblies with SingleFileHost as the entry assembly. ~10MiB per RID. One app per RID.
  • Our dependencies include localizations we don't need since we only support English. These localizations add ~20 MiB (uncompressed) to HXE.exe.

WPF is trim-incompatible

Rampant usage of Reflection and dynamic references e.g. getting a type name from a string.

SingleFile

  • https://docs.microsoft.com/en-us/dotnet/core/deploying/single-file
  • Making a SingleFile app also requires selecting a specific runtime. We have to use the .NET 5+ SingleFile feature since I couldn't get Fody Weavers working after porting the projects to .NET 5+. The SingleFile host adds an additional 10MiB to executable.
  • A SingleFile is heavy. A Self-Contained SingleFile is even heavier.

SingleFile + Win7

XML Serialization is discouraged in favor of System.Text.Json for trim compatibility

XML serialization depends on Reflection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant