-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from pavelsavara/smaller
more trimming, no AOT
- Loading branch information
Showing
2 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<linker> | ||
<!-- | ||
I randomly trimmed methods which I believe are not necessary for this demo. | ||
For example, System.UriTypeConverter -> System.Uri is worth 60kb after compression. | ||
Other good gains which I didn't do in System.ComponentModel could be: | ||
- replacing ConcurrentDictionary with Dictionary since browser is not multi-threaded | ||
- avoid using reflection, like System.ComponentModel.ReflectTypeDescriptionProvider | ||
- trim unnecessary System.ComponentModel.*Converter | ||
For more please see ./obj/Release/net9.0/linked/linker-dependencies.xml and use analysis tools. | ||
https://github.com/dotnet/runtime/blob/main/src/tools/illink/src/analyzer/README.md#how-to-use-the-analyzer | ||
--> | ||
<assembly fullname="System.Private.CoreLib"> | ||
<type fullname="Mono.HotReload.FieldStore"> | ||
<method signature="Mono.HotReload.FieldStore Create(System.RuntimeTypeHandle)" body="remove"/> | ||
</type> | ||
<type fullname="Mono.HotReload.InstanceFieldTable/InstanceFields"> | ||
<method signature="Mono.HotReload.FieldStore LookupOrAdd(System.RuntimeTypeHandle,System.UInt32)" body="remove"/> | ||
</type> | ||
<type fullname="System.TimeZoneInfo"> | ||
<method signature="System.Boolean TryGetLocalTzFile(System.Byte[]&,System.String&)" body="remove"/> | ||
<method signature="System.TimeZoneInfo get_Local()" body="remove"/> | ||
</type> | ||
<type fullname="Interop/Sys"> | ||
<method signature="System.Int32 Unlink(System.String)" body="remove"/> | ||
</type> | ||
<type fullname="System.Threading.Tasks.Task"> | ||
<method signature="System.Boolean InternalWait(System.Int32,System.Threading.CancellationToken)" body="remove"/> | ||
</type> | ||
<type fullname="System.Threading.Thread"> | ||
<method signature="System.Void Sleep(System.Int32)" body="remove"/> | ||
</type> | ||
<type fullname="System.Diagnostics.StackTrace"> | ||
<method signature="System.Void .ctor(System.Boolean)" body="remove"/> | ||
<method signature="System.String ToString(System.Diagnostics.StackTrace/TraceFormat)" body="remove"/> | ||
</type> | ||
<type fullname="System.Runtime.Loader.AssemblyLoadContext"> | ||
<method signature="System.Reflection.RuntimeAssembly ResolveSatelliteAssembly(System.Reflection.AssemblyName)" body="remove"/> | ||
<method signature="System.Reflection.RuntimeAssembly MonoResolveUsingResolveSatelliteAssembly(System.IntPtr,System.String)" body="remove"/> | ||
</type> | ||
</assembly> | ||
<assembly fullname="System.Runtime.InteropServices.JavaScript"> | ||
<type fullname="System.Runtime.InteropServices.JavaScript.JSMarshalerArgument"> | ||
<method signature="System.Void ToJS(System.Object)" body="remove"/> | ||
<method signature="System.Void ToJS(System.Object[])" body="remove"/> | ||
</type> | ||
<type fullname="System.Runtime.InteropServices.JavaScript.JavaScriptExports"> | ||
<method signature="System.Void LoadLazyAssembly(System.Runtime.InteropServices.JavaScript.JSMarshalerArgument*)" body="remove"/> | ||
<method signature="System.Void LoadSatelliteAssembly(System.Runtime.InteropServices.JavaScript.JSMarshalerArgument*)" body="remove"/> | ||
<method signature="System.Void GetManagedStackTrace(System.Runtime.InteropServices.JavaScript.JSMarshalerArgument*)" body="remove"/> | ||
<method signature="System.Void DumpAotProfileData(System.Byte&,System.Int32,System.String)" body="remove"/> | ||
</type> | ||
</assembly> | ||
<assembly fullname="System.ComponentModel.TypeConverter"> | ||
<type fullname="System.UriTypeConverter"> | ||
<method signature="System.UriKind GetUriKind(System.Uri)" body="remove"/> | ||
<method signature="System.Object ConvertFrom(System.ComponentModel.ITypeDescriptorContext,System.Globalization.CultureInfo,System.Object)" body="remove"/> | ||
<method signature="System.Object ConvertTo(System.ComponentModel.ITypeDescriptorContext,System.Globalization.CultureInfo,System.Object,System.Type)" body="remove"/> | ||
</type> | ||
<type fullname="System.ComponentModel.CultureInfoConverter"> | ||
<method signature="System.Object ConvertFrom(System.ComponentModel.ITypeDescriptorContext,System.Globalization.CultureInfo,System.Object)" body="remove"/> | ||
<method signature="System.Object ConvertTo(System.ComponentModel.ITypeDescriptorContext,System.Globalization.CultureInfo,System.Object,System.Type)" body="remove"/> | ||
</type> | ||
<type fullname="System.ComponentModel.VersionConverter"> | ||
<method signature="System.Object ConvertFrom(System.ComponentModel.ITypeDescriptorContext,System.Globalization.CultureInfo,System.Object)" body="remove"/> | ||
<method signature="System.Object ConvertTo(System.ComponentModel.ITypeDescriptorContext,System.Globalization.CultureInfo,System.Object,System.Type)" body="remove"/> | ||
</type> | ||
</assembly> | ||
</linker> |