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

perf: Boost FPS by leveraging performance.now() #11

Merged
merged 2 commits into from
Mar 2, 2025
Merged

perf: Boost FPS by leveraging performance.now() #11

merged 2 commits into from
Mar 2, 2025

Conversation

Naptie
Copy link
Member

@Naptie Naptie commented Mar 2, 2025

No description provided.

@Naptie Naptie requested a review from MisaLiu March 2, 2025 13:03
@MisaLiu
Copy link
Contributor

MisaLiu commented Mar 2, 2025

引用自 MDN

警告: 这个时间戳实际上并不是高精度的。为了降低像Spectre这样的安全威胁,各类浏览器对该类型的值做了不同程度上的四舍五入处理。(Firefox 从 Firefox 59 开始四舍五入到 2 毫秒精度)一些浏览器还可能对这个值作稍微的随机化处理。这个值的精度在未来的版本中可能会再次改善;浏览器开发者还在调查这些时间测定攻击和如何更好的缓解这些攻击。

我认为可针对不同浏览器进行测试,如果在主流浏览器中测试无异常则可以 merge。

@Naptie Naptie marked this pull request as ready for review March 2, 2025 14:43
@Naptie Naptie merged commit 6780f39 into main Mar 2, 2025
9 checks passed
@Naptie
Copy link
Member Author

Naptie commented Mar 2, 2025

optimize 分支可以进行保留,用于进行后续更多方面的优化

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants