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

[Trimming] Remove unnecessary regular expressions #21497

Merged
merged 4 commits into from
Apr 9, 2024

Conversation

simonrozsival
Copy link
Member

Description of Change

There are a few places where we use regular expressions, but we can achieve the same result fairly easily. By refactoring these few methods, we can remove the dependency on System.Text.RegularExpressions.dll completely and shaving off some dead weight. Consider the difference in .ipa size of dotnet new maui built with NativeAOT for iOS:

Before After Diff
5,224,205 B 5,081,799 B 142,406 B (2.7%)

There are still a few places where we use regular expressions (BlazorWebView, WebView, Windows-specific code) that we could investigate.

Issues Fixed

Contributes to #18658

@simonrozsival simonrozsival added the t/app-size Application Size / Trimming (sub: perf) label Mar 28, 2024
@simonrozsival simonrozsival requested a review from a team as a code owner March 28, 2024 12:22
@rmarinho rmarinho merged commit 2a76d88 into dotnet:net9.0 Apr 9, 2024
44 of 47 checks passed
@simonrozsival simonrozsival deleted the remove-regexps branch April 9, 2024 11:43
@github-actions github-actions bot locked and limited conversation to collaborators May 10, 2024
@Eilon Eilon added the area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) label May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) fixed-in-9.0.0-preview.4.10690 t/app-size Application Size / Trimming (sub: perf)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants