Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5cd07c342a66d457a3048c06e78c48f67075baba
https://github.com/WebKit/WebKit/commit/5cd07c342a66d457a3048c06e78c48f67075baba
Author: Ahmad Saleem <[email protected]>
Date: 2026-10-05 (Mon, 05 Oct 2026)
Changed paths:
M
Source/WebCore/layout/formattingContexts/inline/text/TextBreakingPositionCache.cpp
Log Message:
-----------
TextBreakingPositionCache::evict() should remove by iterator instead of
re-hashing the key
https://bugs.webkit.org/show_bug.cgi?id=326191
rdar://189072986
Reviewed by Alan Baradlay.
evict() selects the entry to remove with HashMap::random(), which
already returns an iterator, but then called remove(evictedEntry->key).
That hashes the key and looks it up again; the key holds a String, so
the extra work isn't free, and it runs on every pass of the eviction
loop. Passing the iterator to remove() skips the second lookup.
No behavior change.
*
Source/WebCore/layout/formattingContexts/inline/text/TextBreakingPositionCache.cpp:
(WebCore::Layout::TextBreakingPositionCache::evict):
Canonical link: https://commits.webkit.org/322760@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications