Closed
Bug 927560
Opened 11 years ago
Closed 11 years ago
[OS.File] Make it possible to shutdown osfile_async_worker.js when it's not needed
Categories
(Toolkit Graveyard :: OS.File, defect)
Toolkit Graveyard
OS.File
Tracking
(blocking-b2g:koi+, firefox25 wontfix, firefox26 wontfix, firefox27 fixed, b2g-v1.2 fixed, b2g-v1.3 fixed)
People
(Reporter: fabrice, Assigned: Yoric)
References
Details
(Keywords: perf, Whiteboard: [c=memory p= s= u=1.2] [MemShrink:P1])
Attachments
(4 files, 3 obsolete files)
12.13 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
12.64 KB,
patch
|
Yoric
:
review+
|
Details | Diff | Splinter Review |
11.11 KB,
patch
|
Yoric
:
review+
|
Details | Diff | Splinter Review |
8.37 KB,
patch
|
Yoric
:
review+
|
Details | Diff | Splinter Review |
Workers are quite memory hungry and that's a problem on b2g. As much as we'd like to use OS.File goodness, wasting permanently 1MB to read a file is not something we can live with.
Updated•11 years ago
|
Whiteboard: [MemShrink]
Assignee | ||
Comment 1•11 years ago
|
||
Three possible strategies: 1. Safe and transparent – the worker is shutdown n milliseconds after its last use (which means that any File/DirectoryIterator needs to be closed); 2. Safe and manual – publish an method for closing the worker, the method throws if there is any instance of File/DirectoryIterator around; 3. Unsafe – publish a method for closing the worker, it auto-closes an instance of File/DirectoryIterator. What's your preference? I believe that I would go for 2.
Flags: needinfo?(fabrice)
Assignee | ||
Updated•11 years ago
|
Summary: Shutdown osfile_async_worker.js when it's not needed → [OS.File] Shutdown osfile_async_worker.js when it's not needed
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → dteller
Assignee | ||
Comment 3•11 years ago
|
||
Adding a new API |OS.File.resetWorker|.
Attachment #818454 -
Flags: review?(nfroyd)
Assignee | ||
Comment 4•11 years ago
|
||
Companion tests. I took the opportunity to remove test_system_shutdown and move it to a xpcshell-test, as I needed to run it a number of times to ensure I hadn't broken it.
Attachment #818455 -
Flags: review?(nfroyd)
Blocks a blocker, so copying flags/priority.
blocking-b2g: --- → koi+
Whiteboard: [c=memory p= s= u=] [MemShrink] → [c=memory p= s= u=] [MemShrink:P1]
Assignee | ||
Comment 6•11 years ago
|
||
Try: https://tbpl.mozilla.org/?tree=Try&rev=ba32ddfe3058
Assignee | ||
Updated•11 years ago
|
Severity: normal → blocker
Updated•11 years ago
|
Attachment #818454 -
Flags: review?(nfroyd) → review+
Updated•11 years ago
|
Attachment #818455 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 7•11 years ago
|
||
Adding other Try platforms. Try: https://tbpl.mozilla.org/?tree=Try&rev=69b9b2163dc2
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 8•11 years ago
|
||
[/c/src-gecko/inbound]$ qimp 927560 Fetching... done Parsing... done 1: OS.File.resetWorker nfroyd: review+ 2: Tests nfroyd: review+ adding 927560 to series file renamed 927560 -> osfile.shutdown.test adding osfile.shutdown to series file applying osfile.shutdown patching file toolkit/components/osfile/modules/osfile_async_worker.js Hunk #3 FAILED at 299 1 out of 4 hunks FAILED -- saving rejects to file toolkit/components/osfile/modules/osfile_async_worker.js.rej patch failed, unable to continue (try -v) patch failed, rejects left in working dir errors during apply, please fix and refresh osfile.shutdown Could you rebase and re-mark for checkin please? :-)
Keywords: checkin-needed
Assignee | ||
Comment 9•11 years ago
|
||
Rebased.
Attachment #818454 -
Attachment is obsolete: true
Attachment #821641 -
Flags: review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 10•11 years ago
|
||
Had to rebase osfile.shutdown.test too, but looked trivial, so just landed it to save another back and forth. remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/e5c275ba558e remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/3efb38280835
Keywords: checkin-needed
Comment 11•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e5c275ba558e https://hg.mozilla.org/mozilla-central/rev/3efb38280835
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Comment 12•11 years ago
|
||
This will need an updated patch for aurora/koi uplift: [/c/src-gecko/aurora]$ transplant e5c275ba558e searching for changes applying e5c275ba558e patching file toolkit/components/osfile/modules/osfile_async_front.jsm Hunk #1 FAILED at 92 Hunk #3 FAILED at 988 2 out of 3 hunks FAILED -- saving rejects to file toolkit/components/osfile/modules/osfile_async_front.jsm.rej patching file toolkit/components/osfile/modules/osfile_async_worker.js Hunk #1 FAILED at 61 Hunk #2 FAILED at 186 Hunk #3 FAILED at 281 Hunk #4 FAILED at 328 4 out of 4 hunks FAILED -- saving rejects to file toolkit/components/osfile/modules/osfile_async_worker.js.rej patch failed to apply
Updated•11 years ago
|
Whiteboard: [c=memory p= s= u=] [MemShrink:P1] → [needs-aurora-patch] [c=memory p= s= u=] [MemShrink:P1]
Updated•11 years ago
|
status-b2g-v1.2:
--- → affected
status-firefox25:
--- → wontfix
status-firefox26:
--- → affected
status-firefox27:
--- → fixed
Flags: needinfo?(dteller)
Keywords: branch-patch-needed
Whiteboard: [needs-aurora-patch] [c=memory p= s= u=] [MemShrink:P1] → [c=memory p= s= u=] [MemShrink:P1]
Assignee | ||
Comment 13•11 years ago
|
||
Attachment #823311 -
Flags: review+
Flags: needinfo?(dteller)
Assignee | ||
Comment 14•11 years ago
|
||
Attachment #823313 -
Flags: review+
Assignee | ||
Comment 15•11 years ago
|
||
So, I have attached patches rebased for 26. However, until we know how we are going to use these patches, I'm not 100% sure we should land them.
Comment 16•11 years ago
|
||
(No uplifting yet due to comment 15)
Comment 17•11 years ago
|
||
s/No/Not/
Assignee | ||
Updated•11 years ago
|
Summary: [OS.File] Shutdown osfile_async_worker.js when it's not needed → [OS.File] Make it possible to shutdown osfile_async_worker.js when it's not needed
Comment 18•11 years ago
|
||
Setting status-firefox26 to wontfix since this isn't going to be landing on mozilla-beta at this point.
Updated•11 years ago
|
Keywords: branch-patch-needed
Comment 19•11 years ago
|
||
(In reply to David Rajchenbach Teller [:Yoric] from comment #15) > So, I have attached patches rebased for 26. > However, until we know how we are going to use these patches, I'm not 100% > sure we should land them. I assume that the blocking status of this and bug 921659 will be revisited then?
Comment 20•11 years ago
|
||
This is in my queue for landing on b2g26, but I will wait until the status of this and bug 921659 are sorted out.
Assignee | ||
Comment 21•11 years ago
|
||
It is my understanding that we don't need to uplift this anymore, so removing block.
No longer blocks: 921659
Assignee | ||
Updated•11 years ago
|
blocking-b2g: koi+ → 1.4?
Yeah, I don't think we need this anymore.
blocking-b2g: 1.4? → ---
Reporter | ||
Updated•11 years ago
|
blocking-b2g: --- → koi+
Comment 23•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g26_v1_2/rev/7c90ac565923 https://hg.mozilla.org/releases/mozilla-b2g26_v1_2/rev/5c7962855ea7
Comment 24•11 years ago
|
||
Backed out for xpcshell failures. https://hg.mozilla.org/releases/mozilla-b2g26_v1_2/rev/ad7cf694eaac https://hg.mozilla.org/releases/mozilla-b2g26_v1_2/rev/aa3b9dc8c0e0 https://tbpl.mozilla.org/php/getParsedLog.php?id=31563127&tree=Mozilla-B2g26-v1.2
Assignee | ||
Comment 25•11 years ago
|
||
I'm back in front of bugzilla. Investigating.
Flags: needinfo?(dteller)
Updated•11 years ago
|
Whiteboard: [c=memory p= s= u=] [MemShrink:P1] → [c=memory p= s= u=1.2] [MemShrink:P1]
Assignee | ||
Comment 26•11 years ago
|
||
Looks like the problem was just a timeout that was too short. By increasing the timeout, the test seems to pass.
Attachment #823313 -
Attachment is obsolete: true
Attachment #8346759 -
Flags: review+
Assignee | ||
Comment 27•11 years ago
|
||
Try: https://tbpl.mozilla.org/?tree=Try&rev=25a038a98efc
Assignee | ||
Comment 28•11 years ago
|
||
Sorry, forgot a qref. That's the latest version.
Attachment #8346759 -
Attachment is obsolete: true
Attachment #8347220 -
Flags: review+
Comment 29•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g26_v1_2/rev/4f8e819f8644 https://hg.mozilla.org/releases/mozilla-b2g26_v1_2/rev/66fd5784afd9
Comment 30•11 years ago
|
||
The test was still failing on b2g26. Maybe bug 944859 is why? Anyway, per IRC conversation with Yoric, the test is just going to be skipped. https://hg.mozilla.org/releases/mozilla-b2g26_v1_2/rev/b047544c652a 10:30:33 AM - Yoric: RyanVM: What seems to happen is that some code that prints to the nsIConsole doesn't print anything to that console in your tests. 10:32:21 AM - Yoric: Note that this test only tests whether we print a warning. 10:32:32 AM - Yoric: So I wouldn't be infuriated if we just skipped it.
Updated•11 months ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•