Skip to content

Conversation

edusperoni
Copy link
Collaborator

This adds a very complete timer polyfill that follows closely the chromium implementation.

Still needs unit testing, I'll add some before merge

@cla-bot cla-bot bot added the cla: yes label Oct 21, 2022
@edusperoni edusperoni requested a review from triniwiz October 21, 2022 21:41
@jarmani
Copy link

jarmani commented Oct 31, 2022

@edusperoni Hello ! Out of curiosity, what is the main advantage comparing to the current implementation ?
This will be also implemented in the iOS runtime ?

@edusperoni
Copy link
Collaborator Author

@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.

@jarmani
Copy link

jarmani commented Nov 1, 2022

@edusperoni Amazing, thanks for the explanation !

@NathanWalker NathanWalker changed the base branch from master to feature/v8-update-static-perf November 17, 2022 03:27
@vmutafov vmutafov changed the base branch from feature/v8-update-static-perf to master November 17, 2022 19:44
@vmutafov vmutafov changed the base branch from master to feature/v8-update-static-perf November 17, 2022 19:46
@vmutafov vmutafov merged commit 3415e5c into feature/v8-update-static-perf Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4 participants