-
Notifications
You must be signed in to change notification settings - Fork 508
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
总体思路是放宽idle message的调用门槛,让worker message分散到更长的时间周期里返回给主线程,同时不会因为主线程忙而长时间堵塞worker消息的返回。 主要改进如下: * 改为按百分比设置worker向主线程返回的消息数量,解决繁忙时,worker中消息排队过久的问题 * busyLoop(animFrameLoop)返回更少消息:目前固定为idleLoop中返回比例的一半 * 实测发现workerPool.commit()对性能影响很小,broadcastIdleMessage改为每次loop都会执行。
- Loading branch information
Showing
4 changed files
with
20 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters