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

feat: remove lz compression #654

Merged
merged 9 commits into from
May 31, 2023
Merged

feat: remove lz compression #654

merged 9 commits into from
May 31, 2023

Conversation

pauldambra
Copy link
Member

@pauldambra pauldambra commented May 30, 2023

We've wanted to remove LZ compression for c2 years. #155

it is 5%+ of the bundle size.

Let's remove it

Needs data from PostHog/posthog#15765 to confirm that we don't receive LZ compressed traffic (a quick check of 1 day of nginx logs suggested we don't)

compression options are provided by decide, decide returns a harcoded list, and the library prefers gzip if it is present. So this can only negatively affect people using very, very old self-hosted versions and the latest pothog-js. And even then it would mean they would switch from lz64 to base64 so things would carry on working.

@github-actions
Copy link

github-actions bot commented May 30, 2023

Size Change: -19 kB (-1%)

Total Size: 2.33 MB

Filename Size Change
dist/array.full.js 164 kB -4.75 kB (-3%)
dist/array.js 105 kB -4.74 kB (-4%)
dist/es.js 105 kB -4.74 kB (-4%)
dist/module.js 105 kB -4.81 kB (-4%)
ℹ️ View Unchanged
Filename Size
dist/recorder-v2.js 93.6 kB
dist/recorder.js 58.3 kB
lib/rrweb/dist/plugins/console-record.js 26.6 kB
lib/rrweb/dist/plugins/console-record.min.js 10.8 kB
lib/rrweb/dist/plugins/console-replay.js 12.7 kB
lib/rrweb/dist/plugins/console-replay.min.js 5.72 kB
lib/rrweb/dist/plugins/sequential-id-record.js 910 B
lib/rrweb/dist/plugins/sequential-id-record.min.js 417 B
lib/rrweb/dist/plugins/sequential-id-replay.js 1.24 kB
lib/rrweb/dist/plugins/sequential-id-replay.min.js 578 B
lib/rrweb/dist/record/rrweb-record-pack.js 31.4 kB
lib/rrweb/dist/record/rrweb-record-pack.min.js 10.7 kB
lib/rrweb/dist/record/rrweb-record.js 140 kB
lib/rrweb/dist/record/rrweb-record.min.js 51.7 kB
lib/rrweb/dist/replay/rrweb-replay-unpack.js 188 kB
lib/rrweb/dist/replay/rrweb-replay-unpack.min.js 71.1 kB
lib/rrweb/dist/replay/rrweb-replay.js 172 kB
lib/rrweb/dist/replay/rrweb-replay.min.js 66.4 kB
lib/rrweb/dist/rrweb-all.js 356 kB
lib/rrweb/dist/rrweb-all.min.js 133 kB
lib/rrweb/dist/rrweb.js 302 kB
lib/rrweb/dist/rrweb.min.js 116 kB
lib/rrweb/es/rrweb/ext/base64-arraybuffer/dist/base64-arraybuffer.es5.js 1.94 kB
lib/rrweb/es/rrweb/ext/mitt/dist/mitt.es.js 1.99 kB

compressed-size-action

@pauldambra pauldambra added the bump major Bump major version when this PR gets merged label May 30, 2023
@pauldambra
Copy link
Member Author

With two days of data searched using floor(rate(ingestion_lz64_compressed_event_total{role="events"}[$__rate_interval])) we have no results (floor because prom reports values like 0.1 because computers)

Also a query like {container="posthog-events"} |= <WSGIRequest |= compression=lz finds no results and {container="posthog-events"} |= <WSGIRequest |= compression=gzip finds lots

Copy link
Collaborator

@benjackwhite benjackwhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do it

@pauldambra pauldambra added bump minor Bump minor version when this PR gets merged and removed bump major Bump major version when this PR gets merged labels May 31, 2023
@pauldambra pauldambra merged commit fcdd0b9 into master May 31, 2023
@pauldambra pauldambra deleted the feat/remove-lz-compression branch May 31, 2023 13:38
@pauldambra pauldambra mentioned this pull request May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump minor Bump minor version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants