Store MemoryCache's live decoded resources in a ListHashSet instead of a linked list. The frequent operations are: 1. Add items to one end 2. Remove items from the other end or anywhere in the container by value Using a ListHashSet instead of a manual linked list results in *much* simpler code and is fast for all operations (faster than linked list even for removing an given element from the linked list given its value). The current implementation requires us to keep a lot of pointers up-to-date, which is error prone. This is a first step towards simplifying the MemoryCache implementation.
Created attachment 245653 [details] Patch
Comment on attachment 245653 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=245653&action=review > Source/WebCore/loader/cache/MemoryCache.h:142 > + bool inLiveDecodedResourcesList(CachedResource* resource) const { return m_liveDecodedResources.contains(resource); } It would be nicer to take a reference.
Committed r179402: <http://trac.webkit.org/changeset/179402>