Closed
Bug 863373
Opened 12 years ago
Closed 3 years ago
OS.File needs a read-ahead flag
Categories
(Toolkit Graveyard :: OS.File, defect)
Toolkit Graveyard
OS.File
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: vladan, Unassigned)
References
Details
Using the read-ahead flag can significantly improve read times for large files being read sequentially, e.g. bug 810151
OS.File should have a read-ahead flag and it should use read-ahead in OS.File.read() when the bytes argument is omitted
See bug 845907 for a cross-platform implementation in C++
Comment 1•12 years ago
|
||
For reference, note that we also have a cross-platform implementation for XPCOM:
http://mxr.mozilla.org/mozilla-central/ident?i=OpenNSPRFileDesc&filter=
Comment 2•12 years ago
|
||
I don't know when I will have time to work on this. If anybody wants to pick it up, possibly for a mentored bug, I will be happy to mentor.
Whiteboard: [mentor=Yoric][lang=js][lang=c][lang=c++][mentored bug but not a simple bug][Async:P2]
Comment 3•12 years ago
|
||
If anybody is interested in working on this bug, here are a few details.
The objective is to add an option "readahead" to function |OS.File.read|. This option will ensure that the operating system loads as much as possible of the file in memory, which considerably speeds up the read itself.
Function |OS.File.read| itself is defined here:
http://dxr.mozilla.org/mozilla-central/toolkit/components/osfile/osfile_shared_front.jsm#l301
(this function calls other functions defined in osfile_unix_front.jsm and osfile_win_front.jsm).
We have an implementation of read ahead for C++, defined here: https://bugzilla.mozilla.org/page.cgi?id=splinter.html&bug=845907&attachment=720496 (start reading on line 231). Given that OS.File is developed in JavaScript, we cannot use this implementation, but the algorithm can be ported to JavaScript, with some effort. This will require looking at the lower layers of OS.File (osfile_unix_back.jsm and osfile_win_back.jsm) and understanding js-ctypes, the library we use to call C from JavaScript.
Note: Given that the Linux, MacOS X and Windows implementations are different, if several people want to pick one platform each, I am willing to split this bug in one bug per platform. For the moment, it seems that there is no good manner of implementing read ahead for Android or FirefoxOS.
Comment 4•12 years ago
|
||
Salut Yoric, je suis interessé par ce thème. On feras un developpement pour windows avec un étudiant.
Comment 5•12 years ago
|
||
So, there are several people interested in this bug.
sadouanan, do you (and your student) want to take the Windows version?
Comment 6•12 years ago
|
||
oui la version pour windows nous interesse. J'enverrai aussi ton mail à l'étudiant pour qu'on puisse discuter.
Comment 7•12 years ago
|
||
Let's keep conversations on Bugzilla in English :)
Hi David,
This would be my first bug, so I'd need some oversight to make sure I'm doing everything correctly, but I'd be happy to try working on the Mac OS X version.
Comment 9•12 years ago
|
||
(In reply to wjdittmar from comment #8)
> Hi David,
>
> This would be my first bug, so I'd need some oversight to make sure I'm
> doing everything correctly, but I'd be happy to try working on the Mac OS X
> version.
Hi, wjdittmar.
Actually, there's already someone working on the MacOS X version as part of bug 865389. I'm sure we can help you find another interesting bug to work on, though. Don't hesitate to drop by #introduction if you want to chat about this:
http://client02.chat.mibbit.com/?server=irc.mozilla.org&channel=%23introduction
Comment 10•11 years ago
|
||
Hi i am a beginner i want to work in this bug for linux version so can you help me David
i would feel great
thanks
(In reply to Praveenkumar from comment #10)
> Hi i am a beginner i want to work in this bug for linux version so can you
> help me David
> i would feel great
> thanks
Hi, Praveenkumar.
Actually, there's already someone working on the Linux version as part of bug 865387. I'm sure we can help you find another interesting bug to work on, though. Don't hesitate to drop by #introduction if you want to chat about this:
http://client02.chat.mibbit.com/?server=irc.mozilla.org&channel=%23introduction
Whiteboard: [mentor=Yoric][lang=js][lang=c][lang=c++][mentored bug but not a simple bug][Async:P2]
Comment 12•6 years ago
|
||
Hi David,
i am beginner to this, and i want to work in this bug for windows version.
Can you please help me in getting started with this, it shall be very grateful.
thankyou.
Comment 13•3 years ago
|
||
Mass closure: OSFIle is being replaced with IOUtils and PathUtils. If you think this bug was closed in error, please re-open.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
Updated•2 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•