woodland 20.2.7 → 20.2.9
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 +26 -64
- package/dist/cli.cjs +1 -1
- package/dist/woodland.cjs +294 -103
- package/dist/woodland.js +294 -103
- 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**: **26% faster than raw Node.js, 44% faster than Express.js, 91% of Fastify's performance** - 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 26%, Express.js by 44%, and delivers 91% 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,46 @@ new Woodland(config)
|
|
|
791
791
|
|
|
792
792
|
### 🏆 Framework Performance Showdown
|
|
793
793
|
|
|
794
|
-
**
|
|
794
|
+
**Competitive Performance**: Woodland delivers excellent performance that significantly outperforms both raw Node.js and Express.js, while achieving 91% of Fastify's performance - an outstanding showing for a framework that prioritizes developer experience alongside speed.
|
|
795
795
|
|
|
796
796
|
```
|
|
797
|
-
Framework Comparison (JSON Response) -
|
|
798
|
-
|
|
799
|
-
Woodland framework: 14,173 ops/sec (0.071ms avg) 🥈 Very close second
|
|
800
|
-
Raw Node.js HTTP module: 11,061 ops/sec (0.090ms avg) 🥉 Third place
|
|
801
|
-
Express.js framework: 9,374 ops/sec (0.107ms avg)
|
|
797
|
+
Framework Comparison (JSON Response) - 5-run average
|
|
798
|
+
Platform: Apple Mac Mini M4 Pro, Node.js 24.8.0
|
|
802
799
|
|
|
803
|
-
|
|
800
|
+
Fastify framework: 14,077 ops/sec (0.071ms avg) 🥇 FASTEST
|
|
801
|
+
Woodland framework: 12,865 ops/sec (0.078ms avg) 🥈 Strong second
|
|
802
|
+
Raw Node.js HTTP module: 10,246 ops/sec (0.098ms avg) 🥉 Third place
|
|
803
|
+
Express.js framework: 8,907 ops/sec (0.112ms avg)
|
|
804
|
+
|
|
805
|
+
Performance improvement: +26% faster than raw Node.js, +44% faster than Express.js, 91% of Fastify's performance
|
|
804
806
|
```
|
|
805
807
|
|
|
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**:
|
|
808
|
+
**Why Woodland delivers competitive performance:**
|
|
809
|
+
- **vs Raw Node.js**: Optimized request/response pipeline that eliminates common inefficiencies (+26% faster)
|
|
810
|
+
- **vs Express.js**: Lightweight middleware system that significantly outperforms while maintaining developer experience (+44% faster)
|
|
811
|
+
- **vs Fastify**: Balanced approach that trades some raw speed for enhanced usability (91% of Fastify's performance)
|
|
810
812
|
- Built-in JSON response optimization with smart serialization
|
|
811
813
|
- Efficient header management and intelligent caching strategies
|
|
812
|
-
-
|
|
814
|
+
- Developer-friendly architecture that doesn't sacrifice performance for convenience
|
|
813
815
|
|
|
814
816
|
### Benchmark Results
|
|
815
817
|
|
|
816
|
-
*Node.js
|
|
818
|
+
*Node.js 24.8.0 (1000 iterations, 100 warmup, averaged across 5 runs)*
|
|
817
819
|
|
|
818
820
|
```
|
|
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
821
|
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)
|
|
822
|
+
404 handling: 16,570 ops/sec (0.060ms avg)
|
|
823
|
+
Parameterized routes: 14,971 ops/sec (0.067ms avg)
|
|
824
|
+
Error handling: 14,859 ops/sec (0.067ms avg)
|
|
825
|
+
JSON response: 14,422 ops/sec (0.069ms avg)
|
|
826
|
+
Simple GET: 13,497 ops/sec (0.074ms avg)
|
|
827
|
+
Middleware chain: 12,108 ops/sec (0.083ms avg)
|
|
828
|
+
Large response: 814 ops/sec (1.228ms avg)
|
|
868
829
|
```
|
|
869
830
|
|
|
870
831
|
### Performance Tips
|
|
871
832
|
|
|
872
|
-
1. **Choose Woodland over alternatives**: Woodland provides
|
|
833
|
+
1. **Choose Woodland over alternatives**: Woodland provides 26% better performance than raw Node.js and 44% better than Express.js for JSON responses
|
|
873
834
|
2. **Enable Route Caching**: Route caching provides significant performance improvement - allows() with cache: 4.8M ops/sec vs without: 300K ops/sec
|
|
874
835
|
3. **Optimize Route Order**: Place frequently accessed routes first in your application
|
|
875
836
|
4. **Use Parameter Routes**: Parameter routes perform competitively with static routes (~2.4M vs ~2.5M ops/sec)
|
|
@@ -1293,3 +1254,4 @@ Licensed under the **BSD-3-Clause** license.
|
|
|
1293
1254
|
<div align="center">
|
|
1294
1255
|
<sub>Built with ❤️ by <a href="https://github.com/avoidwork">Jason Mulligan</a></sub>
|
|
1295
1256
|
</div>
|
|
1257
|
+
# Testing pre-commit without loop
|