Closed
Bug 781486
Opened 13 years ago
Closed 8 years ago
Implement Jetpack file API on top of OS.File
Categories
(Add-on SDK Graveyard :: General, enhancement, P2)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: Yoric, Unassigned)
References
Details
(Keywords: main-thread-io, Whiteboard: [Async:ready])
Mozilla-central is getting a new low-level, asynchronous, high-performance, JavaScript file API. A higher-level Jetpack API should be designed and implemented to make this file API comfortable for end users.
Priority: -- → P2
Comment 2•12 years ago
|
||
My two cents are that we should either use OS.File as is and use only one JS api in Mozilla priviledged world - or - go with standards and contribute to Web API efforts:
https://developer.mozilla.org/en-US/docs/DOM/FileReader
https://wiki.mozilla.org/WebAPI/FileHandleAPI
http://dev.w3.org/2009/dap/file-system/file-writer.html
http://dev.w3.org/2009/dap/file-system/file-dir-sys.html
https://hacks.mozilla.org/2012/07/why-no-filesystem-api-in-firefox/
Reporter | ||
Comment 3•12 years ago
|
||
I believe that this depends on the priorities. As far as I understand, we are not going to implement FileWriter in any foreseeable future and OS.File is bound to be more powerful than anything DOM-ish. But, of course, less standard.
Just casually looking at it, I think we'd need to depend on bug 820953 so we can get TextDecoder/TextEncoder to deal with string encoding, since they don't seem to be present in SDK addon's normal context, and I don't see any way to import them.
Depends on: 820953
Blocks: 853176
Reporter | ||
Comment 5•11 years ago
|
||
We strongly need an off main thread file API for Jetpack, however it is implemented. Additionally, part of the feedback gathered during the Summit is that add-on developers need such a feature.
Unless there are very good reasons to do otherwise, I suggest going ahead and publishing OS.File to Jetpack.
Keywords: main-thread-io
Whiteboard: [Async]
Reporter | ||
Updated•11 years ago
|
Whiteboard: [Async] → [Async:P1]
Comment 6•11 years ago
|
||
In today's roundtable, we agreed on changing the `io/fs` implementation to use OS.File where appropriate to take advantage of the off-main-thread IO
Reporter | ||
Updated•11 years ago
|
Whiteboard: [Async:P1] → [Async:ready]
Comment 8•10 years ago
|
||
Yeap here.
Comment 9•10 years ago
|
||
I am curious why OS.File doesn't support both async and sync mode, weird.
Reporter | ||
Comment 10•10 years ago
|
||
(In reply to Yonggang Luo from comment #9)
> I am curious why OS.File doesn't support both async and sync mode, weird.
Because sync I/O freezes the browser, so we want to make sure people never do any sync I/O.
Comment 11•10 years ago
|
||
:Yoric, that's not the point, in worker, we can use both sync and async APIs.
Reporter | ||
Comment 12•8 years ago
|
||
Yonggang Luo, ah, right, we could also have an async mode in workers.
Well, anyway, looks like Jetpack is basically dead, so WONTFIX.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•