Benchmarks and Optimizations
@metcoder95 is already working on this.
Since Mar 6, 2024.
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 880
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 68
Description
Discussed in https://github.com/nodejs/undici/discussions/2891
Originally posted by metcoder95 February 29, 2024
Hey! 👋
Wanted to open a discussion just to get your thoughts on this as I have been thinking about this topic for a while.
I've seen recently quite a few PRs for doing optimizations over fetch especially, and I believe and appreciate all of them as it's super helpful to have people contributing to those ends. Highly appreciated.
Nevertheless, I'm starting to see a pattern of constant micro-optimizations (sometimes companioned by micro-benchmarks) that focus on pretty specific parts of the whole flow on fetch that often than not might not make a big impact if we take a holistic view over the fetch implementation (e.g. cold-paths, use cases that are not often seen, etc.).
I believe that those contributions can be of even greater value if we shift that focus to the holistic view of fetch and how the numbers change based on the changes proposed and if they are of impact or not, as it will help assess the value of the change as well as what other parts we can shift our focus to make fetch faster (or even undici).
For instance we can focus on having a better benchmark setup for fetch only, its Web APIs (e.g. Cookies, CacheStorage, WebSocket, etc.).
Feel free to discard the idea, or maybe propose something different 🙂
I'll try to draft something later this week, but any suggestion is welcomed
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.