go/misc
Garet Halliday 1cfacfbe8a 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 #56100

Change-Id: I42bbed4c2f1fa6579c1f3aa519b6ed8fc003a20c
Reviewed-on: https://go-review.googlesource.com/c/go/+/442995
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
2023-05-22 17:47:47 +00:00
..
cgo/gmp misc/cgo: move registerCgoTests tests to cmd/cgo/internal 2023-05-12 12:00:02 +00:00
chrome/gophertool docs: fix case of GitHub 2021-03-05 02:35:21 +00:00
go_android_exec misc/android: improve exit code workaround 2023-05-03 14:54:58 +00:00
ios all: gofmt main repo 2022-04-11 16:34:30 +00:00
linkcheck all: use bytes.Cut, strings.Cut 2021-10-06 15:53:04 +00:00
wasm wasm: remove redundant calls to setTimeout and clearTimeout 2023-05-22 17:47:47 +00:00
editors all: don't refer to code.google.com/p/go{,-wiki}/ 2015-02-06 14:41:47 +00:00
go.mod misc: update go.mod comment 2023-05-12 12:00:09 +00:00