[Webkit-unassigned] [Bug 231352] IPC should not have client side message hysteresis

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 7 10:29:34 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=231352

--- Comment #3 from Wenson Hsieh <wenson_hsieh at apple.com> ---
(In reply to Kimmo Kinnunen from comment #0)
> IPC should not have client side message hysteresis
> 
> Bug 231304 added the hysteresis to stream implementation.
> 
> The messages may have action at distance that is detectable via out-of-band
> observations.
> At best, the hysteresis needs to be disabled for interfaces with such
> message behaviours.
> At worst, this is not understood and results in hard to understand bugs.
> 
> Example:
> - Current webgl would benefit from hysteresis
> - Current webgl has prepareForDisplay() message
> - If prepareForDisplay() is buffered due to hysteresis, no frame gets
> displayed.
> 
> Leaving a message in the client side buffer is poor form.
> 
> The problem the hysteresis is solving is;
> - client side produces messages fast
> - server side processes messages faster
> - server side goes to sleep fast
> - client side ends up spending significant time in semaphore notification
> 
> 
> This should be solved for example with server side hysteresis wait:
> When server runs out of messages, it waits with a deadline on the stream
> semaphore but does not set the "server is waiting flag".
> To match the current hysteresis implementation, the wait time could be tuned
> to be roughly (current hysteresis item count * average time to produce 1
> item).
> When server does not have new messages messages after the hysteresis wait,
> it sets the "server is waiting flag" and waits on the semaphore.

This server-side, time-based hysteresis idea sounds promising — I'll give it a try as soon as I get a chance!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211007/36cee330/attachment-0001.htm>


More information about the webkit-unassigned mailing list