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

Mangle exported symbols #182935

Merged
merged 36 commits into from
Jun 13, 2023
Merged

Mangle exported symbols #182935

merged 36 commits into from
Jun 13, 2023

Conversation

mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented May 19, 2023

Porting #180462 to a branch in our main repo

For #180461. This prototype tries to mangle exported functions, constants, and classes

Current total savings: 1910kb
New total savings: 4077kb

@mjbvz mjbvz self-assigned this May 19, 2023
This was referenced May 19, 2023
@vscodenpa vscodenpa added this to the May 2023 milestone May 19, 2023
@mjbvz mjbvz modified the milestones: May 2023, June 2023 May 24, 2023
@mjbvz
Copy link
Collaborator Author

mjbvz commented May 24, 2023

Finally got a successful full build: https://dev.azure.com/monacotools/Monaco/_build/results?buildId=215714 Main issue was that I was accidentally mangling ambient type declarations, which messed up some referenced libraries in remote scenarios (this was tricky to track down because it only happens in full builds, not in OSS)

Local testing all seems ok although I haven't run though every scenario. Will continue testing and hopefully get this merged in June

@mjbvz mjbvz requested a review from jrieken June 2, 2023 00:25
@mjbvz mjbvz enabled auto-merge (squash) June 2, 2023 00:26
@jrieken
Copy link
Member

jrieken commented Jun 7, 2023

@mjbvz Can you share numbers how much slower the (product) build will be because of this?

@mjbvz
Copy link
Collaborator Author

mjbvz commented Jun 7, 2023

@jrieken This makes the compile step of the build about 10 minutes slower: going from 13 minutes to 22 minutes. The other builds steps are not effected

This slow down is due to the large number of rename requests we make against typescript. I brought this up to the TS team but they seem unlikely to address it (the rational being that renames are typically triggered only by occasional UI actions). I also use worker threads to improve performance, but can only use two workers at the moment to avoid memory issues on the CI machines

@jrieken
Copy link
Member

jrieken commented Jun 9, 2023

fyi @alexdima - you were wondering about the additional costs of this

@mjbvz mjbvz merged commit debcf16 into main Jun 13, 2023
@mjbvz mjbvz deleted the dev/mjbvz/mangle-exports-2 branch June 13, 2023 06:18
@github-actions github-actions bot locked and limited conversation to collaborators Jul 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants