@componentor/fs 1.2.0 → 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.
Files changed (2) hide show
  1. package/README.md +10 -14
  2. 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 Comparison
67
+ ### 📊 Performance vs LightningFS
68
68
 
69
- | Operation | localStorage | IndexedDB | OPFS-FS |
70
- |-----------|-------------|-----------|---------|
71
- | Small Files | ~50ms | ~20ms | **~5ms** |
72
- | Large Files | Memory limited | ~100ms | **~15ms** |
73
- | Directory Ops | Not supported | Complex | **Native** |
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,14 +141,6 @@ await fs.gc()
137
141
  fs.terminate()
138
142
  ```
139
143
 
140
- **Performance comparison** (100 iterations benchmark):
141
- | Mode | Average Time | vs LightningFS |
142
- |------|-------------|----------------|
143
- | Main Thread | ~175ms | ~1.0x |
144
- | Worker Only | ~145ms | 1.19x faster |
145
- | **Hybrid** | **~144ms** | **1.20x faster** |
146
- | LightningFS | ~173ms | baseline |
147
-
148
144
  ### File Operations
149
145
 
150
146
  #### `readFile(path, options?)`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@componentor/fs",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "A blazing-fast, Node.js-compatible filesystem for the browser using OPFS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",