Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d73b4b3064358261cd1f0ee3585e2b103db6b8db
https://github.com/WebKit/WebKit/commit/d73b4b3064358261cd1f0ee3585e2b103db6b8db
Author: Darin Adler <[email protected]>
Date: 2025-07-16 (Wed, 16 Jul 2025)
Changed paths:
M Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.h
M Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp
M Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h
M Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp
M Source/WebCore/Modules/webdatabase/DatabaseTracker.h
Log Message:
-----------
Putting HashMap in a heap block hurts memory use, speed, code size (WebCore
databases)
https://bugs.webkit.org/show_bug.cgi?id=295861
rdar://155734983
Reviewed by Sihui Liu and Sam Weinig.
HashMap and related class templates already are pointers to a hash table in
production builds, so there is no reason to wrap them in heap block with
unique_ptr and add another level of indirection. Fix this in a few places
in WebCore database modules.
* Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
Revise objectStoreCleared to take a map instead of a pointer to a map.
* Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::forEachRecord): Update since
m_keyValueStore is now a map rather than a pointer to a map.
(WebCore::IDBServer::MemoryObjectStore::containsRecord): Ditto.
(WebCore::IDBServer::MemoryObjectStore::clear): Ditto.
(WebCore::IDBServer::MemoryObjectStore::deleteRecord): Ditto.
(WebCore::IDBServer::MemoryObjectStore::addRecordWithoutUpdatingIndexes): Ditto.
(WebCore::IDBServer::MemoryObjectStore::addRecord): Ditto.
(WebCore::IDBServer::MemoryObjectStore::countForKeyRange const): Ditto.
(WebCore::IDBServer::MemoryObjectStore::valueForKey const): Ditto.
(WebCore::IDBServer::MemoryObjectStore::valueForKeyRange const): Ditto.
(WebCore::IDBServer::MemoryObjectStore::lowestKeyWithRecordInRange const):
Ditto.
(WebCore::IDBServer::MemoryObjectStore::registerIndex): Ditto.
(WebCore::IDBServer::MemoryObjectStore::renameIndex): Ditto.
* Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h: Ditto.
* Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::openDatabases): Update since m_openDatabaseMap is
now a
map containing maps rather than a pointer to a map containing pointers to maps.
(WebCore::DatabaseTracker::addOpenDatabase): Ditto.
(WebCore::DatabaseTracker::removeOpenDatabase): Ditto.
(WebCore::DatabaseTracker::deleteDatabaseFile): Ditto.
* Source/WebCore/Modules/webdatabase/DatabaseTracker.h: Ditto.
Canonical link: https://commits.webkit.org/297507@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes