https://github.com/tkrotoff/jsdom-slow-url-parsing
https://github.com/tkrotoff/jsdom-slow-url-parsing
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tkrotoff/jsdom-slow-url-parsing
- Owner: tkrotoff
- License: mit
- Created: 2024-05-06T14:59:51.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2024-05-06T23:49:02.000Z (12 months ago)
- Last Synced: 2025-02-17T21:34:35.276Z (2 months ago)
- Language: TypeScript
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jsdom-slow-URL-parsing
https://github.com/jsdom/jsdom/issues/3712
https://github.com/mswjs/msw/discussions/2141
[JSDOM/whatwg-url](https://github.com/jsdom/whatwg-url) is slow to parse URLs with long query string.
This repo is an example with 500 [MSW](https://github.com/mswjs/msw) handlers.
Results (MacBook Pro 16" M1, macOS 14.4.1, Node.js v20.12.1):
- Vitest `environment: 'node'`
- JSDOM + MSW short URL: 23.951ms
- JSDOM + MSW long URL: 27.046ms- Vitest `environment: 'happy-dom'`
- JSDOM + MSW short URL: 20.962ms
- JSDOM + MSW long URL: 29.937ms- Vitest `environment: 'jsdom'`
- JSDOM + MSW short URL: 66.226ms
- JSDOM + MSW long URL: **3.740s**- Vitest `environment: 'jsdom'` + [whatwg-url patched](./patches/whatwg-url+14.0.0.patch)
- JSDOM + MSW short URL: 34.554ms
- JSDOM + MSW long URL: **126.326ms**