Open Qwokka opened 1 year ago
The more I think about this, the more I realize that separating the speedhack by WASM binary may not be ideal for a couple reasons.
For one thing, I can't think of a reliable way to determine which WASM binary initated a call to Date.now()
.
Secondly, having the speedhack only affect WASM binaries (Instead of the whole page) might make the speedhack less useful for users.
Overall it seems like a lot of added complexity just to support a single edge-case (Multiple WASM binaries in one page, but we only want to speedhack one of them).
With all that in mind, I think the better way to go about this is to allow to speedhack to be toggled on a per page basis, not a per binary basis.
As mentioned in #50, Cetus now has support for multiple concurrent WASM binaries. We should also support selectively configuring the speedhack.