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

bundle size is inflated by use of TS/JS classes #975

Open
pauldambra opened this issue Jan 28, 2024 · 2 comments
Open

bundle size is inflated by use of TS/JS classes #975

pauldambra opened this issue Jan 28, 2024 · 2 comments

Comments

@pauldambra
Copy link
Member

terser and rollup don't minify class fields and methods so our bundle includes things like this.sessionManager.checkAndGetSessionAndWindowId(!t,e.timestamp) when you might expect it to include o(!t,e.timestamp) after minifying

session recording uses 2 classes: session id manager and session recording and uses long descriptive method names - and is ~ 13% of the final bundle

there is probably an easy win in moving some or all of this to function-based instead of class-based code

@fromaline
Copy link

Looks like the code uses a lot of classes

@fromaline
Copy link

@pauldambra, do you mean something like this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants