Open Bug 1119864 Opened 9 years ago Updated 1 year ago
investigate using a thread pool for Service
Worker Cache sqlite IO thread operations
Currently each Cache Manager object creates a separate thread to perform IO. We should investigate sharing threads between managers using a pool construct. The threads would have to be stable once given to a Manager, though. Also, consider moving NS_AsyncCopy() IO in FileUtils to STS.
I think it's easier to create own thread pool, especially from the point of view of coordinated shutdown when we get profile-before-change in quota manager. If you decide to use STS, you can't shutdown it in ShutdownTranscactionService(). Also, not sure if STS can be used from other than the main thread.
Since STS threads stop in shutdown-threads, I do believe I can successfully shutdown Cache if I use STS. Jan and I talked about this in IRC. Either way, it would be nice if mozStorage took an nsIEventTarget instead of coupling to the thread the connection is opened on.
Actually... I think we should try to do this in v1. One of the review comments was that we do not want to create a separate thread for each origin.
Component: DOM → DOM: Core & HTML
Component: DOM: Core & HTML → Storage: Cache API
You need to log in before you can comment on or make changes to this bug.