询问客户信息以确定执行能力?

发布于 2024-08-09 16:51:33 字数 216 浏览 1 评论 0原文

我正在寻找有关询问当前用户的客户端的经过验证的流程的信息,并且可能对代码段进行基准测试,以确定客户端执行某些类型的代码的效率。

显然,尽可能高效地编写代码是我们不变的目标。然而,某些功能和效果往往会降低低端机器上的体验。通过基准信息,可以逐个用户地禁用某些效果(淡入淡出等),以增加属性/应用程序的体验。

如果您不知道这方面的任何信息,您对如何做到这一点有想法吗?

谢谢

I am looking for information concerning a proven process to interrogate the current user's client, and perhaps benchmark a code piece, to determine how effectively the client is executing certain types of code.

Obviously writing code as efficiently as possibly is the constant goal. However certain features and effects tend to degrade the experience on lower end machines. With benchmark information, it could be possible to disable certain effects (fading, etc) on a user by user basis, to increase the experience of a property/app.

If you don't know of any information on this, do you have ideas on how it could be done?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

关于从前 2024-08-16 16:51:33

使用 setInterval 以合理的帧速率(例如每秒 30 帧)运行动画。每次渲染一帧时,将时间存储在某处。一到两打帧后,根据存储的时间数组检查实际获得的帧速率。如果它明显低于您使用 setInterval 请求的帧速率,则您可能对机器要求过高,应该禁用动画。

Run your animation using setInterval at a reasonable frame rate (say, 30 frames per second). Each time you render a frame, store the time somewhere. After one to two dozen frames, check the framerate you're actually getting, based on your stored array of times. If it's significantly lower than the frame rate you asked for with setInterval, you're probably pushing the machine too hard, and should disable your animations.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文