Open Bug 1759708 Opened 1 year ago Updated 11 months ago

The DOMCacheThread uses a lot of CPU time after a restart for an update


(Core :: Storage: Cache API, defect)




Performance Impact medium


(Reporter: florian, Unassigned, NeedInfo)


(Keywords: perf:resource-use)

Right after restarting for an update, I noticed in about:processes that the DOMCacheThread was using 100% of a core for a while (it has used a total of 18s of CPU time).

Here's a profile of it:

It seems to be doing many short sqlite queries:

Connection::stepStatement SELECT id, COUNT( AS vary_count FROM entries LEFT OUTER JOIN response_headers ON AND'vary' COLLATE NOCASE WHERE entries.cache_id=:cache_id AND entries.request_url_no_query_hash=:url_no_query_hash AND entries.request_url_query_hash=:url_query_hash AND entries.request_url_no_query=:url_no_query AND entries.request_url_query=:url_query GROUP BY ORDER BY;

Connection::stepStatement DELETE FROM entries WHERE id IN

Would there be a way to make these queries more efficient?

janv, is this about the same issue that Cache does some validation after each update.
And if so, isn't this a dup of some old bug?

Flags: needinfo?(jvarga)
Performance Impact: ? → P2
You need to log in before you can comment on or make changes to this bug.