@pixagram/lacerta-db 0.13.1 → 0.13.3
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/dist/browser.min.js +2 -2
- package/dist/index.min.js +2 -2
- package/index.js +868 -175
- package/package.json +4 -2
- package/readme.md +22 -12
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixagram/lacerta-db",
|
|
3
|
-
"version": "0.13.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.13.3",
|
|
4
|
+
"description": "LacertaDB is a JS Database for Web Browsers. Up to 10x faster than others. Simple, Fast, Secure.",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@babel/core": "^7.23.6",
|
|
7
7
|
"@babel/plugin-transform-optional-chaining": "^7.28.6",
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
"author": "Affolter Matias",
|
|
23
23
|
"keywords": [
|
|
24
24
|
"indexeddb",
|
|
25
|
+
"pouchdb",
|
|
26
|
+
"rxdb",
|
|
25
27
|
"database",
|
|
26
28
|
"db",
|
|
27
29
|
"store",
|
package/readme.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<img src="https://raw.githubusercontent.com/pixagram-blockchain/LacertaDB/main/logo.webp?raw=true" alt="LacertaDB Logo" width="800"/>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
<h1 align="center">LacertaDB 0.
|
|
5
|
+
<h1 align="center">LacertaDB 0.13.2</h1>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
8
|
<strong>A high-performance, browser-native document database with encryption, indexing, and MongoDB-like queries.</strong>
|
|
@@ -96,21 +96,31 @@ LacertaDB is a **browser-native** document database built for Web3 applications,
|
|
|
96
96
|
- **Hash** indexes for O(1) exact-match lookups
|
|
97
97
|
- **Full-text search** with CJK support via `Intl.Segmenter`
|
|
98
98
|
- **Geospatial queries** with QuadTree-backed `$near` and `$within`
|
|
99
|
-
|
|
100
99
|
</td>
|
|
101
|
-
|
|
100
|
+
</tr>
|
|
101
|
+
</table>
|
|
102
|
+
|
|
102
103
|
|
|
103
104
|
### Performance
|
|
104
|
-
- **LRU / LFU / TTL** caching strategies per collection
|
|
105
|
-
- **Compression** via CompressionStream (deflate) with magic-byte detection
|
|
106
|
-
- **Cursor-free batch indexing** to prevent `TransactionInactiveError`
|
|
107
|
-
- **Read-optimized mutex** — no global lock on read transactions
|
|
108
|
-
- Built-in performance monitor with optimization tips
|
|
109
|
-
- Idle callback scheduling to keep UI responsive
|
|
110
105
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
106
|
+
| Operation | LacertaDB | PouchDB 7.3 | Speedup |
|
|
107
|
+
|-----------|-----------|-------------|---------|
|
|
108
|
+
| **Bulk Write** | 532 ms | 2,664 ms | **5×** |
|
|
109
|
+
| **Read All** | 146 ms | 356 ms | **2.4×** |
|
|
110
|
+
| **Query** | 124 ms | 399 ms | **3.2×** |
|
|
111
|
+
| **Bulk Update** | 101 ms | 2,708 ms | **26.8×** |
|
|
112
|
+
| **Delete All** | 239 ms | 2,573 ms | **10.8×** |
|
|
113
|
+
|
|
114
|
+
**Why the Gap? It's the Serializer.** LacertaDB uses [TurboSerial](https://www.npmjs.com/package/@pixagram/turboserial).
|
|
115
|
+
|
|
116
|
+
### TurboSerial vs MessagePack vs CBOR
|
|
117
|
+
|
|
118
|
+
| Test Case | MessagePack | CBOR | TurboSerial |
|
|
119
|
+
|-----------|:-----------:|:----:|:-----------:|
|
|
120
|
+
| **Small Data** (API response) | 20,101 ops/s · 34B | 112,360 ops/s · 36B | **176,991 ops/s** · 62B |
|
|
121
|
+
| **Medium Data** (array of objects) | 334 ops/s · 4,093B | 3,460 ops/s · 4,168B | **5,587 ops/s** · 4,809B |
|
|
122
|
+
| **Large Data** (TypedArray 0.2MB) | 711 ops/s · 200,005B | 341 ops/s · 200,005B | **2,703 ops/s** · 200,023B |
|
|
123
|
+
|
|
114
124
|
|
|
115
125
|
---
|
|
116
126
|
|