https://github.com/tkrotoff/jsdom-slow-url-parsing
https://github.com/tkrotoff/jsdom-slow-url-parsing
Last synced: about 1 month 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 (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-07-31T14:53:29.000Z (11 months ago)
- Last Synced: 2025-10-09T04:05:24.551Z (8 months ago)
- Language: TypeScript
- Size: 74.2 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- 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 14" M4 Pro, macOS 15.5, Node.js v22.17.1):
- Vitest `environment: 'node'`
- JSDOM + MSW short URL: 99.363ms
- JSDOM + MSW long URL: 94.716ms
- Vitest `environment: 'happy-dom'`
- JSDOM + MSW short URL: 97.201ms
- JSDOM + MSW long URL: 94.812ms
- Vitest `environment: 'jsdom'`
- JSDOM + MSW short URL: 118.238ms
- JSDOM + MSW long URL: **2.331s**
- Vitest `environment: 'jsdom'` + [whatwg-url patched](./patches/whatwg-url+14.2.0.patch)
- JSDOM + MSW short URL: 102.898ms
- JSDOM + MSW long URL: **130.679ms**