Skip to content

New Workload: JSDOM + d3 #124

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

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

camillobruni
Copy link
Contributor

@camillobruni camillobruni commented Aug 12, 2025

Startup focused d3 + jsdom workload.

  • Evals unique sources per iteration (custom babel plugin which injects comments into each function)
  • Measures d3 demo including parsing csv
  • Uses bundled jsdom as mock library

Copy link

netlify bot commented Aug 12, 2025

Deploy Preview for webkit-jetstream-preview ready!

Name Link
🔨 Latest commit c3457a8
🔍 Latest deploy log https://app.netlify.com/projects/webkit-jetstream-preview/deploys/689f18ef50a1a70008029b90
😎 Deploy Preview https://deploy-preview-124--webkit-jetstream-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kmiller68
Copy link
Contributor

Startup focused d2 + jsdom workload

Typo: d3.

Copy link
Contributor

@kmiller68 kmiller68 left a comment

Choose a reason for hiding this comment

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

Would be Ince to have a README.md with steps to rebuild the minified sources and whatnot.

The minified sources also don't seem to escape the non-ascii characters, which makes the whole file parse as non-ascii. I'm not sure how many sites actually do that but if that's uncommon (which AFAIK it is) we should probably do that escaping.

},
tags: ["d3", "startup", "jsdom"],
iterations: 10,
worstCaseCount: 4,
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like a high worstCaseCount for the number of iterations.

airportsBlob: "./jsdom-d3-startup/data/airports.csv",
},
tags: ["d3", "startup", "jsdom"],
iterations: 10,
Copy link
Contributor

Choose a reason for hiding this comment

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

These iterations are pretty fast, it seems like we could do more like 15-20.

@camillobruni
Copy link
Contributor Author

camillobruni commented Aug 14, 2025

Looks like the officially bundled d3 has some non-ascii chars in it, so there seems to be some precedent for this.

Given that we don't have that really in other files, I'd be fine with it. But I'm not sure how robust thee non-ascii handling is across shells?

@kmiller68
Copy link
Contributor

kmiller68 commented Aug 14, 2025

IIRC, all browsers natively support Latin-1 and UTF-16 strings so µ would be fine but doesn't appear to be Latin-1 indeed. Pretty unfortunate that one character would cause all browsers to parse that file as UTF-16... maybe we should let them know.

On the other hand, I'm not sure how much work we want to do to optimize parsing of non-Latin-1 sources, since no matter what it's going to be slower and use more memory than Latin-1 minified sources. I'd be more open to it if the benchmark were less parsing focused. But this entire benchmark is just parsing, from my initial profiling anyway.

@camillobruni
Copy link
Contributor Author

  • Added README.md
  • Used UnicodeEscapePlugin to ensure ascii encoding

@camillobruni
Copy link
Contributor Author

Also filed d3/d3#4043 since I can easily reproduce and fix this locally now.

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