forked from golang/go
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wasm: remove redundant calls to setTimeout and clearTimeout
The existing implementation clears and recreates Javascript timeouts when Go is called from js, leading to excessive load on the js scheduler. Instead, we should remove redundant calls to clearTimeout and refrain from creating new timeouts if the previous event's timestamp is within 1 millisecond of our target (the js scheduler's max precision) Fixes golang#56100 Change-Id: I42bbed4c2f1fa6579c1f3aa519b6ed8fc003a20c Reviewed-on: https://go-review.googlesource.com/c/go/+/442995 Reviewed-by: Michael Knyszek <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]> Run-TryBot: Michael Knyszek <[email protected]>
- Loading branch information
Showing
3 changed files
with
68 additions
and
29 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