Skip to content

Explore mangling exported symbol names  #180461

@mjbvz

Description

@mjbvz

Follow up on #165429

In #165429, we added managing of private fields in the VS Code codebase, resulting in a nice bundle size reduction

Looking through our shipped sources though, there is still lots of repeated text. One lower hanging branch we could try next is mangling exported functions. The localize function for instance seems to be used around 10000 times in the shipped sources, while as a less extreme case the common array function coalesce appears 100 times

Exported functions are a good candidate because we don't have to worry about them being serialized

With my simple prototype, mangling exported functions names saves an additional 446.412kb on top of the mangled private property names (total size reduction is now 2357.235kb. Size savings will be smaller when the content is served compressed but it's still is a nice "free" size reduction

Metadata

Metadata

Assignees

Labels

debtCode quality issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions