The default bug view has changed. See this FAQ.

Offload evicting offline caches to Cache IO thread.

RESOLVED FIXED in mozilla16

Status

()

Core
Networking: Cache
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: sinker, Assigned: sinker)

Tracking

Trunk
mozilla16
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

5 years ago
OfflineCacheDevice remove entry data from database for evicting at main thread.  Remove these data tasks to cache IO thread can improve the performance.
(Assignee)

Comment 1

5 years ago
Created attachment 637520 [details] [diff] [review]
WIP
(Assignee)

Comment 2

5 years ago
Created attachment 637572 [details] [diff] [review]
Move nsOfflineCacheDevice::Discard() to cache IO thread
Attachment #637520 - Attachment is obsolete: true
Thinker, can you confirm that access to sqlite is thread-safe?

Comment 4

5 years ago
We already use SQLite from two threads here. This patch reduces that which is why it's faster (we lock the main thread without this patch).
Doing something doesn't mean it is safe.  Could anyone here confirm that accessing the connection is really thread safe?  From my experience it is not, but things might change since that time.

Comment 6

5 years ago
The connection is thread safe. We use it currently from multiple threads. With this patch we only use it from one thread.
(In reply to Andreas Gal :gal from comment #6)
> The connection is thread safe. We use it currently from multiple threads.
> With this patch we only use it from one thread.

Thanks.
(Assignee)

Comment 8

5 years ago
Created attachment 638617 [details] [diff] [review]
Move nsOfflineCacheDevice::Discard() to cache IO thread, v2
Attachment #637572 - Attachment is obsolete: true
Attachment #638617 - Flags: review?(honzab.moz)
Comment on attachment 638617 [details] [diff] [review]
Move nsOfflineCacheDevice::Discard() to cache IO thread, v2

Review of attachment 638617 [details] [diff] [review]:
-----------------------------------------------------------------

r=honzab.  Let's get this in.  This is a good patch.
Attachment #638617 - Flags: review?(honzab.moz) → review+
(Assignee)

Comment 10

5 years ago
Created attachment 640492 [details] [diff] [review]
Move nsOfflineCacheDevice::Discard() to cache IO thread, v3

r=honzab
Attachment #638617 - Attachment is obsolete: true
Attachment #640492 - Flags: review+

Comment 11

5 years ago
Thinker, lets land this.

Updated

5 years ago
Assignee: nobody → tlee
https://hg.mozilla.org/integration/mozilla-inbound/rev/5f9bf790012b
Target Milestone: --- → mozilla16
(Assignee)

Comment 13

5 years ago
try https://tbpl.mozilla.org/?tree=Try&rev=e6589935be49
https://hg.mozilla.org/mozilla-central/rev/5f9bf790012b
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.