Closed
Bug 1219150
Opened 9 years ago
Closed 9 years ago
Detect whether we are currently blocking a user-initiated interaction
Categories
(Toolkit :: Performance Monitoring, defect)
Toolkit
Performance Monitoring
Tracking
()
RESOLVED
FIXED
mozilla45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: Yoric, Assigned: Yoric)
References
Details
Attachments
(1 file)
This, with bug 1219145, would let us decrease further false positives.
Assignee | ||
Comment 1•9 years ago
|
||
Boris, I know that we can detect whether an event is user-initiated. Can you point me towards the code that does that?
Flags: needinfo?(bzbarsky)
Comment 2•9 years ago
|
||
EventStateManager::IsHandlingUserInput(), perhaps?
And a scriptable API at http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/base/nsIDOMWindowUtils.idl#1670
Flags: needinfo?(bzbarsky)
Assignee | ||
Comment 3•9 years ago
|
||
`EventStateManager::IsHandlingUserInput()` looks like a good candidate, indeed. It does cause a call the the clock, so we don't want to call it too often, though.
If we are willing to accept a few more false positives, `static int32_t EventStateManager::sUserInputEventDepth` could provide a good approximation, except in case of nested event loops.
Assignee | ||
Comment 4•9 years ago
|
||
Bug 1219150 - EventStateManager::{LatestUserInputStart, UserInputCount};r?smaug
To detect slow behaviors, it is useful to find out whether a user
input was handled between two instants.
This patch introduces EventStateManager::UserInputCount, which lets
client code determine whether user input was handled between two
points of execution, and EventStateManager::LatestUserInputStart,
which lets client code find out when the altest user input was
handled.
Attachment #8694720 -
Flags: review?(bugs)
Comment 5•9 years ago
|
||
Comment on attachment 8694720 [details]
MozReview Request: Bug 1219150 - EventStateManager::{LatestUserInputStart, UserInputCount};r=smaug
Now I'm lost... didn't I review this for Bug 1186491
Attachment #8694720 -
Flags: review?(bugs)
Assignee | ||
Comment 6•9 years ago
|
||
Sorry, I must have made a mistake with MozReview. This is the right bug.
Assignee | ||
Updated•9 years ago
|
Attachment #8694720 -
Attachment description: MozReview Request: Bug 1219150 - EventStateManager::{LatestUserInputStart, UserInputCount};r?smaug → MozReview Request: Bug 1219150 - EventStateManager::{LatestUserInputStart, UserInputCount};r=smaug
Assignee | ||
Comment 7•9 years ago
|
||
Comment on attachment 8694720 [details]
MozReview Request: Bug 1219150 - EventStateManager::{LatestUserInputStart, UserInputCount};r=smaug
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/26841/diff/1-2/
Assignee | ||
Comment 8•9 years ago
|
||
Comment on attachment 8694720 [details]
MozReview Request: Bug 1219150 - EventStateManager::{LatestUserInputStart, UserInputCount};r=smaug
https://reviewboard.mozilla.org/r/26841/#review24427
Accidentally reviewed as part of bug 1186491.
Attachment #8694720 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → dteller
Keywords: checkin-needed
Comment 10•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in
before you can comment on or make changes to this bug.
Description
•