Closed
Bug 921149
Opened 11 years ago
Closed 6 years ago
ArchiveReader for Workers
Categories
(Core :: DOM: Core & HTML, defect, P5)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
INVALID
People
(Reporter: Yoric, Unassigned)
References
Details
(Whiteboard: [Async:ready])
It would be very useful to use ArchiveReader in (at least chrome) Workers.
Comment 1•11 years ago
|
||
Should we wait for the stuff that Kyle is working on before we port more APIs to workers?
Reporter | ||
Comment 3•11 years ago
|
||
(In reply to :Ehsan Akhgari (needinfo? me!) from comment #1) > Should we wait for the stuff that Kyle is working on before we port more > APIs to workers? I suppose that we should. There is also the question of whether the best way to achieve this feature for platform development is to port the native implementation of ArchiveReader to Workers or to reimplement something similar with js-ctypes.
Comment 4•11 years ago
|
||
David, what's your use case for this? We need to prioritize the APIs that we want to port to workers, and currently we have a long list of things needed for Firefox OS already.
Comment 5•11 years ago
|
||
And APIs for the web (WebSocket, IDB)
Reporter | ||
Comment 6•11 years ago
|
||
(In reply to :Ehsan Akhgari (needinfo? me!) from comment #4) > David, what's your use case for this? We need to prioritize the APIs that > we want to port to workers, and currently we have a long list of things > needed for Firefox OS already. Let's ask Mossop, who indirectly inspired this bug.
Flags: needinfo?(dtownsend+bugmail)
Comment 7•11 years ago
|
||
(In reply to David Rajchenbach Teller [:Yoric] from comment #6) > (In reply to :Ehsan Akhgari (needinfo? me!) from comment #4) > > David, what's your use case for this? We need to prioritize the APIs that > > we want to port to workers, and currently we have a long list of things > > needed for Firefox OS already. > > Let's ask Mossop, who indirectly inspired this bug. When the add-ons manager has to extract files from an XPI it currently does so synchronously. I'm attempting to make that async but the only extraction options look to involve at the least opening file streams on the main thread.
Flags: needinfo?(dtownsend+bugmail)
Comment 8•11 years ago
|
||
Probably would be nice to have an ArchiveReaderSync API in workers. It should not be too complex because ArchiveReader is (in part) thread-safe. But I agree with ehsan: we should choose how this API is a priority.
Comment 9•11 years ago
|
||
(In reply to Andrea Marchesini (:baku) from comment #8) > Probably would be nice to have an ArchiveReaderSync API in workers. By default we should have same APIs on workers and main thread, and only if sync version is something super useful, we should add such to workers, IMHO.
Reporter | ||
Comment 10•11 years ago
|
||
Actually, I believe that providing an async version for workers is nearly useless. It leads to more complex client code, it doesn't help remove the main thread bottleneck, plus it can be obtained trivially from a sync version by spawning a worker. So, on workers, I would really concentrate on the sync version. I believe that this is also our policy for e.g. IndexedDB.
Comment 11•11 years ago
|
||
We don't have any such policy (and to me it sounds really odd if we end up exposing sync IDB before async on workers. No other browser has sync IDB, but they do have async IDB even on workers)
Comment 12•11 years ago
|
||
Do we support DOMRequest in workers or do we have any plan to support it? This is the only problem I see in porting ArchiveReader to workers.
Flags: needinfo?(bugs)
Comment 13•11 years ago
|
||
We haven't exposed DOMRequest in workers since there hasn't been any use case for them. The only part which looks main thread only is DOMRequest::Init, which assumes window is non-null. I guess we could rename that to InitForMainThread or make it null-safe. And DOMRequestService can't be used on workers, but I don't know whether it is needed at all for ArchiveReader.
Flags: needinfo?(bugs)
Comment 14•11 years ago
|
||
ArchiveRequestEvent may cause some problems since we don't have a sane event loop on workers.
Reporter | ||
Comment 15•11 years ago
|
||
Andrea, does the current implementation of ArchiveReader do any main thread I/O? If not, for the current scenario, it's probably sufficient.
Flags: needinfo?(amarchesini)
Comment 16•11 years ago
|
||
(In reply to David Rajchenbach Teller [:Yoric] from comment #15) > Andrea, does the current implementation of ArchiveReader do any main thread > I/O? > If not, for the current scenario, it's probably sufficient. It doesn't. ArchiveReader opens the zip files/blobs in a separated thread.
Flags: needinfo?(amarchesini)
Updated•10 years ago
|
Whiteboard: [Async] → [Async:ready]
Updated•6 years ago
|
Priority: -- → P5
Comment 17•6 years ago
|
||
ArchiveReader is not part of any spec. This bug is invalid.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•