Closed Bug 868521 Opened 12 years ago Closed 12 years ago

Don't create a new preallocated process so soon after a process is started

Categories

(Firefox OS Graveyard :: General, defect)

defect
Not set
normal

Tracking

(blocking-b2g:tef+, firefox21 wontfix, firefox22 wontfix, firefox23 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 fixed)

RESOLVED FIXED
blocking-b2g tef+
Tracking Status
firefox21 --- wontfix
firefox22 --- wontfix
firefox23 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- fixed

People

(Reporter: justin.lebar+bug, Assigned: justin.lebar+bug, NeedInfo)

References

Details

Attachments

(1 file)

I don't know if I regressed this or we were always so bad, but I observe that right after we receive a call, almost the first thing we do is launch a new preallocated process! That's quite bad; we're just wasting CPU time. This is easy enough to fix, I think.
Attached patch Patch, v1 (deleted) — Splinter Review
Attachment #747223 - Flags: review?(bent.mozilla)
Assignee: nobody → justin.lebar+bug
blocking-b2g: --- → tef+
Whiteboard: [status: awaiting review]
Hmm. So when I originally coded this, the first idle didn't occur until several seconds after launching a new app. Maybe the dialer is different, in that it actually blocks and waits for something right away. What we discovered with other apps, was that the timeout (which was 5 seconds I think) was occuring before the app had reached idle, so the preallocated process was slowing down the app initialization. Perhaps we need something like first idle after some delay.
> Maybe the dialer is different, in that it actually blocks and waits for something right away. Or perhaps idle happens sooner when we're under CPU stress. > Perhaps we need something like first idle after some delay. This is basically delay-after-first-idle instead of first-idle-after-delay. I hope it's close enough; it's certainly much easier to do.
(In reply to Justin Lebar [:jlebar] from comment #3) > > Maybe the dialer is different, in that it actually blocks and waits for something right away. > > Or perhaps idle happens sooner when we're under CPU stress. IIRC The idle is that the child is idle, which means that it has no messages to process. This typically would happen when it's waiting for async I/O to complete (or the user to press a mouse or something). Maybe the idle stuff has regressed from moving stuff off the main thread to other threads, and the idle isn't "good enough" any more.
> IIRC The idle is that the child is idle, which means that it has no messages to process. Right, but the child could become idle if, for example, it's not being pumped as quickly with messages from the main process. Which could happen under certain types of stress.
Attachment #747223 - Flags: review?(bent.mozilla) → review?(dhylands)
Comment on attachment 747223 [details] [diff] [review] Patch, v1 Review of attachment 747223 [details] [diff] [review]: ----------------------------------------------------------------- This seems like a reasonable compromise for the time being.
Attachment #747223 - Flags: review?(dhylands) → review+
Whiteboard: [status: awaiting review] → [status: needs uplift]
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Can you please provide steps to verify this fix - as we will blackbox test from the UI?
Can you please provide steps to verify this fix - as we will blackbox test from the UI?
Flags: needinfo?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: