@componentor/fs 1.1.8 → 1.2.1
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 +10 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,13 +64,17 @@ The Origin Private File System API provides **direct access to the device's stor
|
|
|
64
64
|
- **Optimized I/O**: Reduced serialization overhead compared to IndexedDB or localStorage
|
|
65
65
|
- **Streaming Support**: Efficient handling of large files without memory constraints
|
|
66
66
|
|
|
67
|
-
### 📊 Performance
|
|
67
|
+
### 📊 Performance vs LightningFS
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
|
72
|
-
|
|
73
|
-
|
|
|
69
|
+
Benchmarked against [LightningFS](https://github.com/isomorphic-git/lightning-fs) (100 iterations):
|
|
70
|
+
|
|
71
|
+
| Operation | LightningFS | OPFS-FS (Hybrid) | Speedup |
|
|
72
|
+
|-----------|-------------|------------------|---------|
|
|
73
|
+
| Batch Writes | 25.57ms | 1.73ms | **14.8x faster** |
|
|
74
|
+
| Batch Reads | 12.64ms | 1.56ms | **8.1x faster** |
|
|
75
|
+
| Single Writes | 66.45ms | 71.37ms | ~1x |
|
|
76
|
+
| Single Reads | 66.76ms | 66.93ms | ~1x |
|
|
77
|
+
| **Total** | **172.85ms** | **144.30ms** | **1.20x faster** |
|
|
74
78
|
|
|
75
79
|
> **Note:** This package was previously published as `@componentor/opfs-fs`. If you're upgrading, simply change your imports from `@componentor/opfs-fs` to `@componentor/fs`.
|
|
76
80
|
|
|
@@ -137,13 +141,6 @@ await fs.gc()
|
|
|
137
141
|
fs.terminate()
|
|
138
142
|
```
|
|
139
143
|
|
|
140
|
-
**Performance comparison** (100 iterations benchmark):
|
|
141
|
-
| Mode | Average Time |
|
|
142
|
-
|------|-------------|
|
|
143
|
-
| Main Thread | ~335ms |
|
|
144
|
-
| Worker Only | ~274ms |
|
|
145
|
-
| **Hybrid** | **~262ms** |
|
|
146
|
-
|
|
147
144
|
### File Operations
|
|
148
145
|
|
|
149
146
|
#### `readFile(path, options?)`
|