Open
Bug 1255070
Opened 8 years ago
Updated 2 years ago
implement nsIBufferedInputStream and nsIBufferedOutputStream on more stream classes that support ReadSegments and WriteSegments
Categories
(Core :: XPCOM, defect, P3)
Core
XPCOM
Tracking
()
NEW
Tracking | Status | |
---|---|---|
e10s | + | --- |
People
(Reporter: bkelly, Unassigned)
References
Details
Attachments
(7 files, 4 obsolete files)
5.49 KB,
patch
|
Details | Diff | Splinter Review | |
3.76 KB,
patch
|
Details | Diff | Splinter Review | |
8.00 KB,
patch
|
Details | Diff | Splinter Review | |
3.67 KB,
patch
|
Details | Diff | Splinter Review | |
3.24 KB,
patch
|
Details | Diff | Splinter Review | |
4.72 KB,
patch
|
Details | Diff | Splinter Review | |
4.73 KB,
patch
|
Details | Diff | Splinter Review |
Currently methods like NS_InputStreamIsBuffered() and NS_OutputStreamIsBuffered() do something like this: 1) Check if the stream implements the appropriate nsIBuffered* interface type. 2) If not, call ReadSegments() or WriteSegments() with a dummy callback. Currently the only stream types that implement the nsIBuffered* interfaces are nsBufferedInputStream and nsBufferedOutputStream. This means we hit case (2) a lot. The fallback in (2) is a problem for a couple reasons: a) It can cause I/O b) It is unreliable. For example, an async stream might return WOULD_BLOCK which results in the stream being marked as non-buffered. It would be much better all around if we simply implemented nsIBufferedInputStream and nsIBufferedOutputStream on my concrete stream classes. I have a patch to do this for nsPipeInputStream in bug 1093357, but I think we should do it to others as well.
Reporter | ||
Comment 1•8 years ago
|
||
This patch has r+, but needs some review comments addressed from bug 1093357 comment 64.
Attachment #8728499 -
Flags: review+
Reporter | ||
Comment 2•8 years ago
|
||
Addressed review feedback. Updated commit message to reflect new bug.
Attachment #8728499 -
Attachment is obsolete: true
Attachment #8728590 -
Flags: review+
Reporter | ||
Comment 3•8 years ago
|
||
Reporter | ||
Comment 4•8 years ago
|
||
Reporter | ||
Comment 5•8 years ago
|
||
Attachment #8728593 -
Attachment is obsolete: true
Reporter | ||
Comment 6•8 years ago
|
||
Lets just see how these few changes do on try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=bd3866e72dd7
Reporter | ||
Comment 7•8 years ago
|
||
Reporter | ||
Comment 8•8 years ago
|
||
Fix classinfo on string streams. https://treeherder.mozilla.org/#/jobs?repo=try&revision=5ee7b703ef2e
Attachment #8728610 -
Attachment is obsolete: true
Reporter | ||
Comment 9•8 years ago
|
||
Reporter | ||
Comment 10•8 years ago
|
||
Reporter | ||
Comment 11•8 years ago
|
||
Reporter | ||
Comment 12•8 years ago
|
||
This is probably as far as I will go for now. https://treeherder.mozilla.org/#/jobs?repo=try&revision=fe642fcccfd8
Reporter | ||
Comment 13•8 years ago
|
||
Comment on attachment 8728590 [details] [diff] [review] P1 Make nsPipeInputStream implement nsIBufferedInputStream. r=froydnj I landed this in bug 1093357 after all.
Attachment #8728590 -
Attachment is obsolete: true
Updated•8 years ago
|
tracking-e10s:
--- → +
Priority: -- → P1
Reporter | ||
Comment 14•8 years ago
|
||
I'm surprised this is such a priority for e10s. Do you have data that shows this is a bad problem in practice. My work here has been a bit speculative. Incidentally I think we should take this bug in a slightly different direction. Instead of directly implementing nsIBufferedInputStream I think we should create a new interface type. This new type would provide a better that could be used to test buffered status at runtime in order to support aggregate stream types. nsIBufferedInputStream and these other stream types would implement this new interface.
Updated•8 years ago
|
Priority: P1 → P3
Reporter | ||
Comment 15•6 years ago
|
||
Andrea, this might be of interest to you.
Assignee: ben → nobody
Status: ASSIGNED → NEW
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•