Closed
Bug 1315479
Opened 9 years ago
Closed 9 years ago
Use requestIdleCallback for the message handling queues
Categories
(Chat Core :: General, defect)
Chat Core
General
Tracking
(Not tracked)
RESOLVED
FIXED
Instantbird 52
People
(Reporter: aleth, Assigned: aleth)
References
Details
Attachments
(3 files, 1 obsolete file)
|
3.40 KB,
patch
|
aleth
:
review+
|
Details | Diff | Splinter Review |
|
2.85 KB,
patch
|
clokep
:
review+
|
Details | Diff | Splinter Review |
|
3.34 KB,
patch
|
florian
:
review+
|
Details | Diff | Splinter Review |
A new DOM feature very close to what we once were considering.
| Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8807895 -
Flags: review?(florian)
| Assignee | ||
Updated•9 years ago
|
Assignee: nobody → aleth
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•9 years ago
|
||
For extra smoothness, we can use it in the socket queue too.
Attachment #8807896 -
Flags: review?(clokep)
| Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8807897 -
Flags: review?(clokep)
| Assignee | ||
Updated•9 years ago
|
Attachment #8807896 -
Attachment is obsolete: true
Attachment #8807896 -
Flags: review?(clokep)
| Assignee | ||
Updated•9 years ago
|
Summary: Use requestIdleCallback for the message display queue → Use requestIdleCallback for the message handling queues
| Assignee | ||
Updated•9 years ago
|
Component: Conversation → General
Product: Instantbird → Chat Core
Comment 4•9 years ago
|
||
Comment on attachment 8807895 [details] [diff] [review]
Use requestIdleCallback for the message display queue
Review of attachment 8807895 [details] [diff] [review]:
-----------------------------------------------------------------
Very nice! :-)
2 questions:
- should we call cancelIdleCallback when the conversation is closed? I assume no, because the existing this._messageDisplayPending check with an early return should be enough.
- should we provide a timeout value to ensure the conversation doesn't freeze if some CPU heavy computation is happening somewhere else?
| Assignee | ||
Comment 5•9 years ago
|
||
(1) Right, we don't have to bother for the reason you give. (2) Here's a patch that would add a timeout of half a second. But I can't really think of any common scenario where it would be needed, so I'm not sure it's worth the extra overhead.
Comment 6•9 years ago
|
||
Comment on attachment 8807981 [details] [diff] [review]
Use the timeout option
Review of attachment 8807981 [details] [diff] [review]:
-----------------------------------------------------------------
I wonder how one is expected to pick the timeout value. If we add messages to the conversation only twice per second and stop each time after one message because timing.timeRemaining() is 0, it'll take ages to display a large conversation on hold.
::: chat/content/convbrowser.xml
@@ +391,5 @@
> </body>
> </method>
>
> + <!-- This is the entry point when messages are added without
> + using appendMessage, e.g. in the log viewer. -->
that's also the scrollback when reopening a conv on hold, right?
Attachment #8807981 -
Flags: review+
| Assignee | ||
Comment 7•9 years ago
|
||
(In reply to Florian Quèze [:florian] [:flo] from comment #6)
> Comment on attachment 8807981 [details] [diff] [review]
> Use the timeout option
>
> Review of attachment 8807981 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> I wonder how one is expected to pick the timeout value. If we add messages
> to the conversation only twice per second and stop each time after one
> message because timing.timeRemaining() is 0, it'll take ages to display a
> large conversation on hold.
Yes, if it's the timeout that's causing the call, timing.timeRemaining() is guaranteed to be 0 because it's not an idle period. In practice I don't think the timeout case will happen unless something is wrong and there is some horrible gc/i-o/... problem. In testing, the typical idle period available seems to be between 6 and 50 ms.
So I'm still not sure if we should take the timeout addition (at the cost of an extra setTimeout per call, I guess) - thoughts?
Comment 8•9 years ago
|
||
(In reply to aleth [:aleth] from comment #7)
> So I'm still not sure if we should take the timeout addition (at the cost of
> an extra setTimeout per call, I guess) - thoughts?
Really not sure either, I hadn't noticed it's calling setTimeout internally.
If you want to try without the timeout, we can test it for a couple days on Nightly and see if anybody complains :).
| Assignee | ||
Comment 9•9 years ago
|
||
Comment on attachment 8807895 [details] [diff] [review]
Use requestIdleCallback for the message display queue
Review of attachment 8807895 [details] [diff] [review]:
-----------------------------------------------------------------
OK, let's try that.
Attachment #8807895 -
Flags: review?(florian) → review+
| Assignee | ||
Comment 10•9 years ago
|
||
https://hg.mozilla.org/comm-central/rev/008aabedc586769dc8799b920b22c4e05dbd8fcd
Bug 1315479 - Use requestIdleCallback for the message display queue. r=florian
Updated•9 years ago
|
Attachment #8807897 -
Flags: review?(clokep) → review+
| Assignee | ||
Comment 11•9 years ago
|
||
https://hg.mozilla.org/comm-central/rev/bccab5fc1a0636c9f57a2b03313261627fcb5f85
Bug 1315479 - Use requestIdleCallback for the socket data queue. r=clokep
| Assignee | ||
Updated•9 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Instantbird 52
| Assignee | ||
Comment 12•9 years ago
|
||
https://hg.mozilla.org/releases/comm-aurora/rev/5bf2d86df8a0f807e68fec40989419d026d62178
Backed out changeset 008aabedc586 (Bug 1315479). rs=bustage-fix
You need to log in
before you can comment on or make changes to this bug.
Description
•