@signaltree/core 1.1.0 → 1.1.2
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 +35 -35
- package/fesm2022/signaltree-core.mjs +361 -434
- package/fesm2022/signaltree-core.mjs.map +1 -1
- package/index.d.ts +1 -213
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,14 +4,14 @@ The foundation package for SignalTree - featuring revolutionary recursive typing
|
|
|
4
4
|
|
|
5
5
|
## ✨ What is @signaltree/core?
|
|
6
6
|
|
|
7
|
-
SignalTree Core is the lightweight (
|
|
7
|
+
SignalTree Core is the lightweight (5.2KB gzipped) foundation that provides:
|
|
8
8
|
|
|
9
9
|
- **🔥 Revolutionary Recursive Typing** with deep nesting support and strong type inference
|
|
10
10
|
- **⚡ Excellent Performance** - 0.021ms at 15+ levels with consistent speed
|
|
11
11
|
- **🏆 Strong Type Safety** with TypeScript inference at 25+ recursive levels
|
|
12
12
|
- **💾 Memory Efficient** through structural sharing and lazy signals
|
|
13
13
|
- **🌳 Lightweight Abstractions** for recursive patterns
|
|
14
|
-
- **📦 Compact Bundle Size** - Complete recursive power in just
|
|
14
|
+
- **📦 Compact Bundle Size** - Complete recursive power in just 5.2KB gzipped
|
|
15
15
|
|
|
16
16
|
### 🔥 Recursive Depth Performance Metrics
|
|
17
17
|
|
|
@@ -559,35 +559,34 @@ class AppStateService {
|
|
|
559
559
|
|
|
560
560
|
_Exceptional scaling: Only 92% performance overhead for 4x depth increase_
|
|
561
561
|
|
|
562
|
-
###
|
|
562
|
+
### SignalTree Core Performance Results (Measured)
|
|
563
563
|
|
|
564
|
-
| Operation | SignalTree Core |
|
|
565
|
-
| --------------------------- | --------------- |
|
|
566
|
-
| Tree initialization (small) | **0.031ms** |
|
|
567
|
-
| Tree initialization (large) | **0.745ms** |
|
|
568
|
-
| Single update | **0.188ms** |
|
|
569
|
-
| Nested update (5 levels) | **0.188ms** |
|
|
570
|
-
| Computation (cached) | **0.094ms** |
|
|
571
|
-
| Memory per 1K entities | **1.2MB** |
|
|
564
|
+
| Operation | SignalTree Core | Notes |
|
|
565
|
+
| --------------------------- | --------------- | ---------------- |
|
|
566
|
+
| Tree initialization (small) | **0.031ms** | 27 nodes |
|
|
567
|
+
| Tree initialization (large) | **0.745ms** | 341 nodes |
|
|
568
|
+
| Single update | **0.188ms** | Property update |
|
|
569
|
+
| Nested update (5 levels) | **0.188ms** | Deep tree update |
|
|
570
|
+
| Computation (cached) | **0.094ms** | Memoized result |
|
|
571
|
+
| Memory per 1K entities | **1.2MB** | Measured usage |
|
|
572
572
|
|
|
573
573
|
### Advanced Performance Features
|
|
574
574
|
|
|
575
|
-
| Feature | SignalTree Core
|
|
576
|
-
| ------------------- |
|
|
577
|
-
| Batching efficiency | Standard
|
|
578
|
-
| Memoization speedup | Basic
|
|
579
|
-
| Memory efficiency | **
|
|
580
|
-
| Bundle impact |
|
|
575
|
+
| Feature | SignalTree Core | With Extensions | Notes |
|
|
576
|
+
| ------------------- | ----------------- | ---------------------- | ---------------------- |
|
|
577
|
+
| Batching efficiency | Standard | **455.8x improvement** | vs non-batched |
|
|
578
|
+
| Memoization speedup | Basic | **197.9x speedup** | vs non-memoized |
|
|
579
|
+
| Memory efficiency | **Optimized** | **Further optimized** | Lazy signals + cleanup |
|
|
580
|
+
| Bundle impact | **5.2KB gzipped** | **+15KB max** | Tree-shakeable |
|
|
581
581
|
|
|
582
|
-
### Developer Experience
|
|
582
|
+
### Developer Experience (Core Package)
|
|
583
583
|
|
|
584
|
-
| Metric | SignalTree Core |
|
|
585
|
-
| ----------------------- | --------------- |
|
|
586
|
-
| Lines of code (counter) | **4 lines** | 32
|
|
587
|
-
| Files required | **1 file** | 4
|
|
588
|
-
|
|
|
589
|
-
|
|
|
590
|
-
| Maintenance score | **9.2/10** | 3.8 | 6.5 | **2.4x better** |
|
|
584
|
+
| Metric | SignalTree Core | Traditional State Mgmt | **Improvement** |
|
|
585
|
+
| ----------------------- | --------------- | ---------------------- | --------------- |
|
|
586
|
+
| Lines of code (counter) | **4 lines** | 18-32 lines | **68-88% less** |
|
|
587
|
+
| Files required | **1 file** | 3-4 files | **75% fewer** |
|
|
588
|
+
| Setup complexity | **Minimal** | Complex | **Simplified** |
|
|
589
|
+
| API surface | **Small** | Large | **Focused** |
|
|
591
590
|
|
|
592
591
|
### Memory Usage Comparison
|
|
593
592
|
|
|
@@ -859,15 +858,16 @@ const tree = signalTree(initialState).pipe(withBatching(), withMemoization(), wi
|
|
|
859
858
|
|
|
860
859
|
### Available Extensions
|
|
861
860
|
|
|
862
|
-
- **@signaltree/batching** (+1KB) - Batch multiple updates
|
|
863
|
-
- **@signaltree/memoization** (+
|
|
864
|
-
- **@signaltree/middleware** (+
|
|
865
|
-
- **@signaltree/async** (+
|
|
866
|
-
- **@signaltree/entities** (+
|
|
867
|
-
- **@signaltree/devtools** (+
|
|
868
|
-
- **@signaltree/time-travel** (+
|
|
869
|
-
- **@signaltree/ng-forms** (+
|
|
870
|
-
- **@signaltree/
|
|
861
|
+
- **@signaltree/batching** (+1.1KB gzipped) - Batch multiple updates
|
|
862
|
+
- **@signaltree/memoization** (+1.7KB gzipped) - Intelligent caching & performance
|
|
863
|
+
- **@signaltree/middleware** (+1.2KB gzipped) - Middleware system & taps
|
|
864
|
+
- **@signaltree/async** (+1.7KB gzipped) - Advanced async actions & states
|
|
865
|
+
- **@signaltree/entities** (+929B gzipped) - Advanced entity management
|
|
866
|
+
- **@signaltree/devtools** (+2.3KB gzipped) - Redux DevTools integration
|
|
867
|
+
- **@signaltree/time-travel** (+1.6KB gzipped) - Undo/redo functionality
|
|
868
|
+
- **@signaltree/ng-forms** (+3.4KB gzipped) - Complete Angular forms integration
|
|
869
|
+
- **@signaltree/serialization** (+3.6KB gzipped) - State persistence & SSR support
|
|
870
|
+
- **@signaltree/presets** (+537B gzipped) - Environment-based configurations
|
|
871
871
|
|
|
872
872
|
## 🎯 When to Use Core Only
|
|
873
873
|
|
|
@@ -1000,7 +1000,7 @@ Extend the core with optional feature packages:
|
|
|
1000
1000
|
|
|
1001
1001
|
### Performance & Optimization
|
|
1002
1002
|
|
|
1003
|
-
- **[@signaltree/batching](../batching)** (+
|
|
1003
|
+
- **[@signaltree/batching](../batching)** (+3.7KB) - Batch multiple updates for better performance
|
|
1004
1004
|
- **[@signaltree/memoization](../memoization)** (+2KB) - Intelligent caching & performance optimization
|
|
1005
1005
|
|
|
1006
1006
|
### Advanced Features
|