Closed
Bug 849943
Opened 13 years ago
Closed 13 years ago
Investigate removing the extra dispatch for child process notifications in MainThreadEventTarget
Categories
(Core :: Storage: IndexedDB, defect)
Core
Storage: IndexedDB
Tracking
()
| Tracking | Status | |
|---|---|---|
| b2g18 | - | --- |
People
(Reporter: bent.mozilla, Assigned: khuey)
References
Details
Attachments
(1 file)
|
6.33 KB,
patch
|
bent.mozilla
:
review+
|
Details | Diff | Splinter Review |
Bug 848316 showed some fun slowness in a gaia app due to a busy event loop. The problem is made slightly worse by the fact that we do an extra NS_DispatchToMainThread from the MainThreadEventTarget helper whenever we receive a message from the parent. Removing this dispatch causes immediate assertion failures/crashes in our IPC tests so it's not a simple thing to remove. If we can remove it we should though.
| Assignee | ||
Comment 1•13 years ago
|
||
| Assignee | ||
Updated•13 years ago
|
Attachment #724186 -
Attachment is patch: true
Attachment #724186 -
Flags: review?(bent.mozilla)
| Reporter | ||
Comment 2•13 years ago
|
||
Comment on attachment 724186 [details] [diff] [review]
Patch
Review of attachment 724186 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with this:
::: dom/indexedDB/AsyncConnectionHelper.cpp
@@ +636,2 @@
> {
> *aIsOnCurrentThread = NS_IsMainThread();
Just make this return true always.
::: dom/indexedDB/ipc/IndexedDBChild.cpp
@@ +390,3 @@
> if (NS_FAILED(openHelper->Dispatch(&target))) {
> NS_WARNING("Dispatch of IPCOpenDatabaseHelper failed!");
> return false;
Hm, before we had to check for failure because NS_DispatchToMainThread could conceivably fail. Now we're always going to just call Run on runnables that we control, right? So we should be able to MOZ_ASSERT that they never fail rather than do release-mode checks here I think.
Attachment #724186 -
Flags: review?(bent.mozilla) → review+
Updated•13 years ago
|
Assignee: nobody → khuey
| Assignee | ||
Comment 4•13 years ago
|
||
Status: NEW → ASSIGNED
| Reporter | ||
Comment 5•13 years ago
|
||
This small change will speed up indexedDB requests a little for child processes (see bug 848316 for some context). Can we get this into b2g18?
blocking-b2g: --- → tef?
tracking-b2g18:
--- → ?
Comment 6•13 years ago
|
||
bent - do you have a sense for how much this bug could help improve contacts app startup, say with 500 contacts?
Updated•13 years ago
|
Flags: needinfo?(bent.mozilla)
Comment 7•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
| Reporter | ||
Comment 8•13 years ago
|
||
(In reply to Michael Vines [:m1] [:evilmachines] from comment #6)
> bent - do you have a sense for how much this bug could help improve contacts
> app startup, say with 500 contacts?
No, it's really impossible to say without measuring the final contacts app code (we're still trying to tweak it to make scrolling work while loading). The problem is that the speedup depends on how busy the child process' main event loop is. If the event loop is free then there will be no speedup with this patch. If the event loop is very busy then the speedup could be significant.
Flags: needinfo?(bent.mozilla)
Comment 9•13 years ago
|
||
Ok, thanks. tef- for now until we can determine if this will do anything meaningful in v1.0.1
blocking-b2g: tef? → -
Comment 10•13 years ago
|
||
As with comment 9 - if there's no clear win here then there's not much of a case for tracking & uplifting. Please re-nom if there is a strong case and a good reward vs. risk.
You need to log in
before you can comment on or make changes to this bug.
Description
•