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

fix: squash down recorder size a little #1064

Closed
wants to merge 3 commits into from
Closed

Conversation

pauldambra
Copy link
Member

@pauldambra pauldambra commented Mar 8, 2024

This didn't have as big an impact as I'd hoped, but we can use the absence of initiator type allowlist to mean allow all, and keep an empty array meaning allow none. Which means we don't need to have a list of unminifiable strings in the bundle.

And since we have multiple no-op functions in the recorder we can share them to save a few more bytes

tested by running recording locally with payload capture on and off

Copy link

github-actions bot commented Mar 8, 2024

Size Change: -934 B (0%)

Total Size: 848 kB

Filename Size Change
dist/array.full.js 182 kB -178 B (0%)
dist/array.js 123 kB -178 B (0%)
dist/es.js 123 kB -178 B (0%)
dist/module.js 123 kB -178 B (0%)
dist/recorder-v2.js 106 kB -222 B (0%)
ℹ️ View Unchanged
Filename Size
dist/exception-autocapture.js 12.1 kB
dist/recorder.js 58.7 kB
dist/surveys-module-previews.js 62.1 kB
dist/surveys.js 58.4 kB

compressed-size-action

@pauldambra pauldambra force-pushed the chore/is-this-smaller branch from c1d1a6c to 05909ce Compare March 9, 2024 00:10
@pauldambra pauldambra changed the title chore: is this smaller fix: squash down recorder size a little Mar 9, 2024
@pauldambra pauldambra marked this pull request as ready for review March 9, 2024 10:07
@PostHog PostHog deleted a comment from posthog-bot Mar 9, 2024
@pauldambra
Copy link
Member Author

🤯 looking at the data we then capture, there are multiple initiator types that we don't handle well 😢

@pauldambra pauldambra closed this Mar 9, 2024
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

Successfully merging this pull request may close these issues.

1 participant