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

Improve timer's performance #4

Closed
Yuyz0112 opened this issue Nov 12, 2018 · 0 comments
Closed

Improve timer's performance #4

Yuyz0112 opened this issue Nov 12, 2018 · 0 comments
Labels
good first issue Good for newcomers

Comments

@Yuyz0112
Copy link
Member

Yuyz0112 commented Nov 12, 2018

We are using requestAnimationFrame to perform a more accurate timer than setTimeout.
Currently, we init a timer for every recorded event, which means there are multiple requestAnimationFrame checks at the same time.

According to the spec, the callbacks of RAF are stored in a list and executed in order, so multiple RAF should have no main difference to one.
But this benchmark shows the multiple ones was much slower.

Maybe we should also implement a callback list with an optimized data structure, which sorted the callbacks by its timestamp.
For example:

[
  { cb: fn1, timestamp: t1 },
  { cb: fn2, timestamp: t2 },
]
@Yuyz0112 Yuyz0112 added the good first issue Good for newcomers label Nov 12, 2018
ghost pushed a commit that referenced this issue Nov 14, 2018
ghost pushed a commit that referenced this issue Nov 14, 2018
ghost pushed a commit that referenced this issue Nov 15, 2018
ghost pushed a commit that referenced this issue Nov 15, 2018
ghost pushed a commit that referenced this issue Nov 16, 2018
ghost pushed a commit that referenced this issue Nov 16, 2018
ghost pushed a commit that referenced this issue Nov 16, 2018
ghost pushed a commit that referenced this issue Nov 16, 2018
ghost pushed a commit that referenced this issue Nov 16, 2018
ghost pushed a commit that referenced this issue Nov 16, 2018
ghost pushed a commit that referenced this issue Nov 16, 2018
Juice10 added a commit that referenced this issue Feb 9, 2023
YunFeng0817 pushed a commit that referenced this issue Mar 19, 2023
Juice10 pushed a commit that referenced this issue Mar 28, 2023
* first commit

* rrvideo v0.1.0

First version of rrvideo.

1. Use as a Node.JS lib.
2. Use as a CLI.

Features are implemented via puppeteer, ffmpeg and rrweb-player.

* add readme

* update publish script

* add node env in cli file and change package.json bin to same like README (#4)

Co-authored-by: Xu Yinjie <[email protected]>

* release 0.2.0

* fix #6 avoid assign undefined to config

* Fix: Solve the inconsistency between rrvideo and the real recorded page rendering when rendering the page with a headless browser (rrweb-io/rrvideo#26)

Author: xujiujiu <[email protected]>

---------

Co-authored-by: xujiujiu <[email protected]>

* refactor rrvideo

1. refactor code
2. change monorepo config
3. remove separate TS dependencies

* add changeset

* fix: eslint errors

---------

Co-authored-by: Yanzhen Yu <[email protected]>
Co-authored-by: xyj <[email protected]>
Co-authored-by: Xu Yinjie <[email protected]>
Co-authored-by: xujiujiu <[email protected]>
lewgordon-amplitude pushed a commit to lewgordon-amplitude/rrweb that referenced this issue Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant