Should we let contributions opt into a stable perf label? (perf-measurement names break in prod builds) #17852
Unanswered
ankitsharma101
asked this question in
Ideas
Replies: 1 comment
|
Hi @ankitsharma101, thanks for starting this discussion! 👋 The Theia community will take a look soon. In the meantime, you might find helpful information in: 💙 Eclipse Theia is built and maintained by a community of contributors and sponsors. If Theia is valuable to your work, consider sponsoring the project. For professional support, training, or consulting services, learn more about available options. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Idea Description
While profiling frontend startup, I ran into something that might be worth
discussing more generally: perf labels for contribution lifecycle hooks
(
initialize/configure/onStart) are justcontribution.constructor.name.That works fine in dev, but in a minified production build the bundler mangles
class names, so the labels turn into unreadable garbage — right when you'd most
want trustworthy perf data.
A couple of directions come to mind, and I'm not sure which is better:
perfIdfield, falling back toconstructor.namewhen unset.this (e.g. Terser's
keep_classnames, esbuild'skeepNames). This would fixit for every contribution automatically, no API change needed, though it
presumably makes the bundle very slightly larger and affects all classes,
not just contributions.
Curious what people think — is this worth solving at the build level, or is an
opt-in API cleaner? Happy to put together a PR either way once there's some
direction.
All reactions