-
-
Notifications
You must be signed in to change notification settings - Fork 4
React Native Support & High-throughput Performance Improvements #102
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
Conversation
…e before onRequest interceptors
… creating a shallow copy
…d primitive inputs in sanitizeObject
- Updated @testing-library/react from 16.3.0 to 16.3.2 - Updated @types/react from 19.2.7 to 19.2.13 - Updated eslint-plugin-prettier from 5.5.4 to 5.5.5 - Updated globals from 16.5.0 to 17.3.0 - Updated prettier from 3.7.4 to 3.8.1 - Updated react from 19.2.1 to 19.2.4 - Updated react-dom from 19.2.1 to 19.2.4 - Updated typescript-eslint from 8.48.1 to 8.54.0 - Increased size limit for dist/react/index.js from 9.5 KB to 10 KB
…and online events
…by timer yielded revalidator
…y and performance
|
The new build of fetchf delivers a massive performance improvement, especially with string-based caching. Caching-enabled requests now reach an incredible 5,531,140 ops/sec (98 runs, ±0.28%), up from ~1,433,180 ops/sec in the old build — an increase of over 4×, making repeated requests almost instantaneous. Even simple fetchf requests without caching achieve 726,285 ops/sec (97 runs, ±0.96%), and config-heavy requests hit 661,279 ops/sec (91 runs, ±1.60%), both slightly below the old build numerically but benefiting from the new build’s lighter execution paths, improved memory access, and optimized request handling, making them effectively faster and more consistent under real-world workloads. |
size-limit report 📦
|
|
As per benchmarks the string-based caching in fetchf (~5.5M ops/sec) is 5–50× faster than node-cache in most realistic scenarios. For workloads dominated by high-frequency repeated requests, fetchf with string caching is dramatically faster than likes of standard fetch wrappers and axios + node-cache and can handle millions of operations per second with minimal overhead. Packages like node-cache aare fine for moderate use cases, but for ultra-high-throughput scenarios, fetchff new build outperforms them by a large margin. |
devdgna
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
This pull request adds first-class support for React Native, improves cache key generation, and enhances configuration merging and abort handling. It also updates documentation and dependencies for better compatibility and developer experience.
React Native / Platform Support
Performance / Caching
for…ofinstead offorEachsanitizeObjectto avoid dangerous properties and improve performancemarkInFlightto avoid duplicate function callsensureListenerSetfor performancesetInFlightPromisefor deduplicationBug Fixes / Correctness
Refactor / Maintainability
Tests
sanitizeObjectact()for state updates and cleanupDocumentation / Benchmarks
Chores / Dev