Closed Bug 802107 Opened 13 years ago Closed 3 years ago

[OS.File] Copy files with sendfile wherever splice is not available

Categories

(Toolkit Graveyard :: OS.File, enhancement)

All
Linux
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: Yoric, Unassigned)

References

()

Details

(Whiteboard: [Async:ready])

Under Linux/Android/Firefox OS, most file systems support operation |sendfile()|, which is generally the fastest way of copying the contents of a file. We should implement this.
OS: Mac OS X → Linux
Hardware: x86 → All
Whiteboard: [mentor=Yoric][lang=js]
Assignee: nobody → miteshpathak05
Is sendfile really faster than splice (which is implemented)? With 2.6.33 and above, sendfile uses splice internally (in the kernel).
Good point. Before making any robust implementation, it would be useful to benchmark a |sendfile|-based implementation vs. a |splice|-based implementation on various configurations.
(In reply to David Rajchenbach Teller [:Yoric] <away until Jan 7th> from comment #2) > Good point. Before making any robust implementation, it would be useful to > benchmark a |sendfile|-based implementation vs. a |splice|-based > implementation on various configurations. As mentioned in comment 1, sendfile uses splice internally. No amount of benchmark will show significant difference, since they are the same thing. The advantage of sendfile over splice is that it is available on FreeBSD and Solaris, iirc.
Ah, right. I replied without thinking. Updating the topic.
Summary: [OS.File] Copy files with sendfile under Linux → [OS.File] Copy files with sendfile wherever splice is not available
Any news?
Flags: needinfo?(miteshpathak05)
On second thought, the patch would have an extremely minor impact and would not even be tested by Try, so this is probably not the right place to spend our time and efforts.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
(In reply to David Rajchenbach Teller [:Yoric] from comment #6) > On second thought, the patch would have an extremely minor impact and would > not even be tested by Try Why wouldn't it? > so this is probably not the right place to spend our time and efforts. If a volunteer wants to come in and do it, i don't see why we should prevent him from doing so. Mitesh is a volunteer, isn't he?
(In reply to Mike Hommey [:glandium] from comment #7) > (In reply to David Rajchenbach Teller [:Yoric] from comment #6) > > On second thought, the patch would have an extremely minor impact and would > > not even be tested by Try > > Why wouldn't it? Last time I checked, we didn't have FreeBSD or Solaris on Try. > > so this is probably not the right place to spend our time and efforts. > > If a volunteer wants to come in and do it, i don't see why we should prevent > him from doing so. Mitesh is a volunteer, isn't he? Sure, but as the mentor for that bug, I recommended that he should find a more interesting mentored bug to work on :)
Flags: needinfo?(miteshpathak05)
Isn't the bug still valid? I mean, if someone comes with a patch we wouldn't reject it.
Fair enough, reopening but de-mentoring.
Status: RESOLVED → UNCONFIRMED
Ever confirmed: false
Resolution: WONTFIX → ---
Whiteboard: [mentor=Yoric][lang=js]
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [Async]
Assignee: miteshpathak05 → nobody
Severity: normal → enhancement
Whiteboard: [Async] → [Async:ready]

OSFIle is being replaced with IOUtils and PathUtils.

Status: NEW → RESOLVED
Closed: 12 years ago3 years ago
Resolution: --- → WONTFIX
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.