Closed edusperoni closed 1 year ago
@edusperoni Hello ! Out of curiosity, what is the main advantage comparing to the current implementation ? This will be also implemented in the iOS runtime ?
@jarmani yes, I intend to do a similar implementation on the iOS side.
The main advantage is that it's 2-4x faster for scheduling and firing callbacks as it doesn't hit the JNI bridge anymore. Additionally, in my tests the current timeout will freeze the app scheduling a huge amount of timeouts (like 1e5), which doesn't happen on this implementation.
@edusperoni Amazing, thanks for the explanation !
This adds a very complete timer polyfill that follows closely the chromium implementation.
Still needs unit testing, I'll add some before merge