woodland 20.2.7 → 20.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -64
- package/dist/woodland.cjs +293 -102
- package/dist/woodland.js +293 -102
- package/package.json +24 -14
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
## 🚀 Features
|
|
17
17
|
|
|
18
|
-
- **🏆 Performance Leader**: **
|
|
18
|
+
- **🏆 Performance Leader**: **11% faster than raw Node.js, 1% faster than Express.js, competitive with Fastify** - proven by benchmarks
|
|
19
19
|
- **⚡ Zero Overhead**: Framework features with performance gains, not costs
|
|
20
20
|
- **🔒 Security First**: Built-in CORS, ETags, and comprehensive security headers
|
|
21
21
|
- **🛤️ Smart Routing**: Parameter syntax (`/users/:id`) and RegExp support with caching
|
|
@@ -58,7 +58,7 @@ app.always(rateLimit({
|
|
|
58
58
|
|
|
59
59
|
**Stop accepting framework overhead.** Most HTTP frameworks slow you down in exchange for convenience. Woodland breaks that trade-off.
|
|
60
60
|
|
|
61
|
-
🏆 **Proven Performance**: Comprehensive benchmarks show Woodland **outperforms raw Node.js by
|
|
61
|
+
🏆 **Proven Performance**: Comprehensive benchmarks show Woodland **outperforms raw Node.js by 11%, Express.js by 1%, and delivers 84% of Fastify's performance**
|
|
62
62
|
⚡ **Zero Compromise**: Get all the framework features you need with better performance than hand-coding
|
|
63
63
|
🚀 **Battle-Tested**: 100% statement coverage with 416 comprehensive tests, production-ready security, and enterprise-grade reliability
|
|
64
64
|
🔧 **Developer Experience**: Express-compatible API means zero learning curve for your team
|
|
@@ -791,85 +791,44 @@ new Woodland(config)
|
|
|
791
791
|
|
|
792
792
|
### 🏆 Framework Performance Showdown
|
|
793
793
|
|
|
794
|
-
**
|
|
794
|
+
**Competitive Performance**: Woodland delivers solid performance that consistently outperforms raw Node.js and matches Express.js speed, while achieving 84% of Fastify's performance - a strong showing for a framework that prioritizes developer experience alongside speed.
|
|
795
795
|
|
|
796
796
|
```
|
|
797
|
-
Framework Comparison (JSON Response) - Averaged across 5 runs
|
|
798
|
-
Fastify framework:
|
|
799
|
-
Woodland framework:
|
|
800
|
-
|
|
801
|
-
|
|
797
|
+
Framework Comparison (JSON Response) - Averaged across 5 runs on Node.js 24.8.0
|
|
798
|
+
Fastify framework: 15,847 ops/sec (0.063ms avg) 🥇 FASTEST
|
|
799
|
+
Woodland framework: 13,388 ops/sec (0.075ms avg) 🥈 Second place
|
|
800
|
+
Express.js framework: 13,312 ops/sec (0.075ms avg) 🥉 Close third
|
|
801
|
+
Raw Node.js HTTP module: 12,010 ops/sec (0.083ms avg)
|
|
802
802
|
|
|
803
|
-
Performance improvement: +
|
|
803
|
+
Performance improvement: +11% faster than raw Node.js, +1% faster than Express.js, 84% of Fastify's performance
|
|
804
804
|
```
|
|
805
805
|
|
|
806
|
-
**Why Woodland delivers
|
|
807
|
-
- **vs Raw Node.js**: Optimized request/response pipeline that eliminates common inefficiencies
|
|
808
|
-
- **vs Express.js**: Lightweight middleware system
|
|
809
|
-
- **vs Fastify**:
|
|
806
|
+
**Why Woodland delivers competitive performance:**
|
|
807
|
+
- **vs Raw Node.js**: Optimized request/response pipeline that eliminates common inefficiencies (+11% faster)
|
|
808
|
+
- **vs Express.js**: Lightweight middleware system with comparable speed and better developer experience (+1% faster)
|
|
809
|
+
- **vs Fastify**: Balanced approach that trades some raw speed for enhanced usability (84% of Fastify's performance)
|
|
810
810
|
- Built-in JSON response optimization with smart serialization
|
|
811
811
|
- Efficient header management and intelligent caching strategies
|
|
812
|
-
-
|
|
812
|
+
- Developer-friendly architecture that doesn't sacrifice performance for convenience
|
|
813
813
|
|
|
814
814
|
### Benchmark Results
|
|
815
815
|
|
|
816
|
-
*Node.js
|
|
816
|
+
*Node.js 24.8.0 (1000 iterations, 100 warmup, averaged across 5 runs)*
|
|
817
817
|
|
|
818
818
|
```
|
|
819
|
-
Routing Operations
|
|
820
|
-
Allowed methods: 4,797,153 ops/sec (0.0002ms avg)
|
|
821
|
-
Path conversion: 2,561,369 ops/sec (0.0004ms avg)
|
|
822
|
-
Parameter routes: 2,416,581 ops/sec (0.0004ms avg)
|
|
823
|
-
Static routes: 2,467,653 ops/sec (0.0004ms avg)
|
|
824
|
-
Not found routes: 2,479,326 ops/sec (0.0004ms avg)
|
|
825
|
-
Route caching: 1,388,793 ops/sec (0.0007ms avg)
|
|
826
|
-
Allowed cache: 2,092,956 ops/sec (0.0005ms avg)
|
|
827
|
-
Route resolution: 917,799 ops/sec (0.0011ms avg)
|
|
828
|
-
|
|
829
|
-
Utility Operations
|
|
830
|
-
Number padding: 7,695,461 ops/sec (0.0001ms avg)
|
|
831
|
-
MIME detection: 4,619,160 ops/sec (0.0002ms avg)
|
|
832
|
-
Middleware chain: 3,759,994 ops/sec (0.0003ms avg)
|
|
833
|
-
Time formatting: 3,512,863 ops/sec (0.0003ms avg)
|
|
834
|
-
Content pipeability: 3,214,295 ops/sec (0.0003ms avg)
|
|
835
|
-
URL parsing: 2,838,552 ops/sec (0.0004ms avg)
|
|
836
|
-
Status determination: 3,095,503 ops/sec (0.0003ms avg)
|
|
837
|
-
Timezone offset: 4,638,018 ops/sec (0.0002ms avg)
|
|
838
|
-
Parameter extraction: 1,059,064 ops/sec (0.0009ms avg)
|
|
839
|
-
Directory listing: 470,633 ops/sec (0.0021ms avg)
|
|
840
|
-
|
|
841
|
-
File Serving Operations
|
|
842
|
-
Static file serving: 582,978 ops/sec (0.0017ms avg)
|
|
843
|
-
Stream operations: 330,495 ops/sec (0.0030ms avg)
|
|
844
|
-
ETag generation: 336,330 ops/sec (0.0030ms avg)
|
|
845
|
-
Stream with ETags: 332,530 ops/sec (0.0030ms avg)
|
|
846
|
-
HEAD requests: 68,935 ops/sec (0.015ms avg)
|
|
847
|
-
Small files: 39,396 ops/sec (0.025ms avg)
|
|
848
|
-
Large files: 42,231 ops/sec (0.024ms avg)
|
|
849
|
-
Medium files: 41,680 ops/sec (0.024ms avg)
|
|
850
|
-
Directory listing: 19,076 ops/sec (0.052ms avg)
|
|
851
|
-
Directory autoindex: 18,224 ops/sec (0.055ms avg)
|
|
852
|
-
|
|
853
819
|
HTTP Operations
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
Error handling: 12,631 ops/sec (0.079ms avg)
|
|
862
|
-
PUT requests: 11,169 ops/sec (0.090ms avg)
|
|
863
|
-
Middleware chain: 10,993 ops/sec (0.091ms avg)
|
|
864
|
-
Mixed workload: 10,916 ops/sec (0.092ms avg)
|
|
865
|
-
POST requests: 10,595 ops/sec (0.094ms avg)
|
|
866
|
-
Simple GET: 12,515 ops/sec (0.080ms avg)
|
|
867
|
-
Large response: 922 ops/sec (1.084ms avg)
|
|
820
|
+
404 handling: 16,570 ops/sec (0.060ms avg)
|
|
821
|
+
Parameterized routes: 14,971 ops/sec (0.067ms avg)
|
|
822
|
+
Error handling: 14,859 ops/sec (0.067ms avg)
|
|
823
|
+
JSON response: 14,422 ops/sec (0.069ms avg)
|
|
824
|
+
Simple GET: 13,497 ops/sec (0.074ms avg)
|
|
825
|
+
Middleware chain: 12,108 ops/sec (0.083ms avg)
|
|
826
|
+
Large response: 814 ops/sec (1.228ms avg)
|
|
868
827
|
```
|
|
869
828
|
|
|
870
829
|
### Performance Tips
|
|
871
830
|
|
|
872
|
-
1. **Choose Woodland over alternatives**: Woodland provides
|
|
831
|
+
1. **Choose Woodland over alternatives**: Woodland provides 11% better performance than raw Node.js and 1% better than Express.js for JSON responses
|
|
873
832
|
2. **Enable Route Caching**: Route caching provides significant performance improvement - allows() with cache: 4.8M ops/sec vs without: 300K ops/sec
|
|
874
833
|
3. **Optimize Route Order**: Place frequently accessed routes first in your application
|
|
875
834
|
4. **Use Parameter Routes**: Parameter routes perform competitively with static routes (~2.4M vs ~2.5M ops/sec)
|
|
@@ -1293,3 +1252,4 @@ Licensed under the **BSD-3-Clause** license.
|
|
|
1293
1252
|
<div align="center">
|
|
1294
1253
|
<sub>Built with ❤️ by <a href="https://github.com/avoidwork">Jason Mulligan</a></sub>
|
|
1295
1254
|
</div>
|
|
1255
|
+
# Testing pre-commit without loop
|