While chatting about bug 870043 jlebar realized that we could be shooting ourselves in the foot here. The slow script mechanism uses wall clock time and that could cause lower priority background processes to have their scripts aborted even though they haven't really run for very long. We need something better, maybe counting js instructions or per-thread CPU time?
5 years ago
Since nobody looks at the "Platform" field: This bug is specifically about b2g.
This sounds like a useful enhancement but not something we'd block release on without partner request for it. We can track, and look at an uplift nomination when one is ready. Also putting c= to get this into scrum backlog.
I can have a look at this one.
Ben, Since bug 870043 comment 31, the slow script watchdog has been disabled on B2G. Is that bug still valid?
My understanding was that it was disabled on the b2g-18 branch but it's still enabled for b2g on trunk, and will remain so after bholley fixes up the watchdog mechanism in bug 870043.
(In reply to Johnny Stenback (:jst, firstname.lastname@example.org) from comment #5) > My understanding was that it was disabled on the b2g-18 branch but it's > still enabled for b2g on trunk, and will remain so after bholley fixes up > the watchdog mechanism in bug 870043. Yeah. That bug is just waiting for inbound to open, and then it'll land.
4 years ago
Do we have a JS "tick" that would be available to use? I couldn't find anything in the documentation or the code. Nor could I find something that could give me the "cpu time" in the thread APIs.
Bobby, do you have an idea or do you know who might have? (comment 7) Thanks.
I have no idea. Kyle might know.
I don't understand the question. What does "tick" mean?
Tick is something about elapsed time (clock ticking). I don't really know how you'd call it. To know if the JS runtime has done something, unrelated to actual elapsed time from the clock, because we my not run all the time.
Ok, you should ask the JS team then. Not sure why bholley needinfoed me ...
The JS engine doesn't really have a way to measure time than actual elapsed time.
Thanks. I was afraid that this was the case.
I think it is a bit out of are of expertise and think that this should be handled by the JS team.
Hi Ben, since bug 870043 resolved some of the watchdog timer issues, is this bug still an issue?
Yes, as far as I know the issue is unresolved. The slow script dialog relies on wall clock time and we have no way to know if any actual work was done between two arbitrary wall clock times.
4 years ago