[OS.File] Linux/Android/B2G optimizations

NEW
Unassigned

Status

()

Core
Networking: File
P3
normal
6 years ago
5 months ago

People

(Reporter: Yoric, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [necko-backlog])

Linux kernels offer the following functions:
- dirfd, fdopendir;
- openat, statat, unlinkat, etc.

Whenever they can be used, they can be much faster than open, stat, unlink, etc. We should expose them and make use of them.
We might wish to implement the following functions in the front-end:

- File.prototype.linuxDirectoryIterator (behaves as |new DirectoryIterator|, but from a file descriptor, using |fdopendir|);

- File.prototype.linuxOpenAt (behaves as |File.open|, but for a file in |this|, and only if |this| is a directory);

- File.prototype.linuxInfoAt (behaves as |File.info|, but for a file in |this|, and only if |this| is a directory);

- File.prototype.linuxRemoveAt (behaves as |File.remove|, but for a file in |this|, and only if |this| is a directory).
Depends on: 770538
Blocks: 563742
No longer depends on: 770538
Depends on: 770538
Whiteboard: [necko-backlog]
You need to log in before you can comment on or make changes to this bug.