Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduler: Increase Precision of Measurment #14

Open
garthenweb opened this issue Oct 6, 2019 · 0 comments
Open

Scheduler: Increase Precision of Measurment #14

garthenweb opened this issue Oct 6, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@garthenweb
Copy link
Owner

The performance measurement is currently not super precise as it only collects performance information from the direct JavaScript handler that is called. It does not take layouts triggered by writes that apply in the handlers into account.

See the following article for detailed information: https://nolanlawson.com/2018/09/25/accurately-measuring-layout-on-the-web/amp/

As far as I am aware, there is currently no browser API that can expose this information properly, but it might be possible to workaround:
With the tricks mentioned in the article using requestAnimationFrame(() => setTimeout(handler, 0)) we might be able to measure the cost of one update including it's layout.
Based on this we can measure the difference to the JavaScript handlers.

  • An easy approach would be to simply add the difference relative to all handlers executed.
  • Further, it might be possible to execute handlers in different combinations the longer the program runs to gather more data to distinguish more expensive from less expensive handlers and apply the results proportionally.
@garthenweb garthenweb added the enhancement New feature or request label Oct 6, 2019
garthenweb added a commit that referenced this issue Oct 6, 2019
Attempt to optimize measurments for layouts after the
JS handlers are executed.

See #14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant