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

Use streaming JSON parse for timing profile to work around V8 string size limit #4999

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

bduffany
Copy link
Member

@bduffany bduffany commented Oct 11, 2023

Related issues: N/A

@bduffany bduffany changed the title Use streaming JSON parse for timing profile to work around string siz… Use streaming JSON parse for timing profile to work around string size limit Oct 11, 2023
Base automatically changed from rpc-service-fetch-api to master October 11, 2023 20:00
@bduffany bduffany force-pushed the profile-stream branch 2 times, most recently from ed862f3 to f93e429 Compare October 11, 2023 21:24
@bduffany bduffany changed the title Use streaming JSON parse for timing profile to work around string size limit Use streaming JSON parse for timing profile to work around V8 string size limit Oct 11, 2023
@bduffany bduffany force-pushed the profile-stream branch 2 times, most recently from 2445d7c to ac0eab1 Compare October 11, 2023 21:28
@bduffany bduffany marked this pull request as ready for review October 11, 2023 21:28
@bduffany bduffany force-pushed the profile-stream branch 2 times, most recently from 22cc447 to d835aa0 Compare October 11, 2023 21:29

let approxCompressionRatio = 1;
if (encoding === "gzip") {
approxCompressionRatio = 11.3;
Copy link
Member

Choose a reason for hiding this comment

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

lol

Copy link
Member Author

@bduffany bduffany Oct 12, 2023

Choose a reason for hiding this comment

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

😁

I was a little surprised that there was no way w/ the Fetch API to get the number of compressed bytes downloaded, but timing profiles should all have pretty similar compression ratio so this is probably good enough

app/invocation/invocation_timing_card.tsx Outdated Show resolved Hide resolved
@bduffany bduffany force-pushed the profile-stream branch 8 times, most recently from be6d5b1 to 3ff38a2 Compare October 12, 2023 14:43
@bduffany bduffany enabled auto-merge (squash) October 12, 2023 14:44
@bduffany bduffany merged commit 70788af into master Oct 13, 2023
7 checks passed
@bduffany bduffany deleted the profile-stream branch October 13, 2023 02:43
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.

2 participants