Commit graph

19 commits

Author SHA1 Message Date
Shannon Booth
de6aec04e8 LibGC: Default-construct ConservativeVector from the global heap 2026-05-20 20:37:55 +02:00
Andreas Kling
2fda5ffc9b LibWeb: Seek IndexedDB record ranges
Add a helper for finding key-range slices in sorted record vectors. Use
it for object-store and index range operations.
2026-05-11 11:01:46 +02:00
Andreas Kling
41c3989433 LibWeb: Use binary search for IndexedDB record lookups
Use sorted record vectors when looking up and removing exact store and
index records. This avoids scanning already-ordered lists.
2026-05-11 11:01:46 +02:00
Andreas Kling
a2f4f6dcbf LibWeb: Insert IndexedDB index records in sorted order
Keep index records ordered as they are stored instead of appending and
sorting the entire record vector for every insert. This avoids repeated
O(n log n) work during bulk object-store writes while preserving the
ordering by index key and referenced object-store key.

Add a text test covering out-of-order index writes with repeated index
keys, so cursor iteration still observes the required record order.
2026-05-11 11:01:46 +02:00
Andreas Kling
6564eff91c LibWeb: Heap-allocate SerializationRecord in IndexedDB ObjectStoreRecord
Wrap the SerializationRecord (Vector<u8, 1024>) in an OwnPtr so that
each ObjectStoreRecord is only ~16 bytes instead of ~1040+ bytes.
This makes Vector operations on the records list dramatically cheaper
since memmove now shifts pointers instead of kilobyte-sized buffers.
2026-03-21 08:41:13 -05:00
Zaggy1024
547d4eb1f5 LibWeb: Implement IndexedDB request/transaction reverts
To allow these to be reverted, we store mutation logs per object store
in the scope of a readwrite transaction to track the modifications that
were made by it. If a revert is needed, the log is played in reverse to
bring us back to the original state.
2026-03-20 23:59:35 -05:00
stelar7
bac1c84241 LibWeb/IDB: Implement retrieve_multiple_items_from_an_index 2025-08-27 16:13:25 +02:00
stelar7
13674c1b32 LibWeb/IDB: Resolve FIXME regarding removing from indecies 2025-05-14 17:17:29 +02:00
stelar7
46ecf239c4 LibWeb/IDB: Implement storing of index records 2025-05-14 17:17:29 +02:00
stelar7
852323009f LibWeb/IDB: Implement IDBIndex::count 2025-05-14 17:17:29 +02:00
stelar7
3fa1d1299c LibWeb/IDB: Implement IDBIndex::getAll 2025-05-14 17:17:29 +02:00
stelar7
e74e571b56 LibWeb/IDB: Implement IDBIndex::get 2025-05-14 17:17:29 +02:00
stelar7
637f35c0eb LibWeb/IDB: Implement clear_an_object_store 2025-05-08 14:13:21 +01:00
stelar7
9d5f6108e4 LibWeb/IDB: Implement recent spec changes 2025-05-06 13:30:37 +01:00
stelar7
0ed71d87ca LibWeb/IDB: Dont move away the name when creating an Index 2025-05-06 11:16:01 +02:00
stelar7
f3a31c98ea LibWeb/IDB: Use correct key comparison when doing Index lookup 2025-05-06 11:16:01 +02:00
stelar7
fb17dae42b LibWeb/IDB: Implement store_a_record_into_an_object_store 2025-04-23 12:31:14 -06:00
stelar7
3367352991 LibWeb/IDB: Implement IDBObjectStore::createIndex 2025-04-09 11:48:49 -06:00
stelar7
9321ad04c0 LibWeb/IDB: Add internal Index object 2025-04-09 11:48:49 -06:00