询问客户信息以确定执行能力?
我正在寻找有关询问当前用户的客户端的经过验证的流程的信息,并且可能对代码段进行基准测试,以确定客户端执行某些类型的代码的效率。
显然,尽可能高效地编写代码是我们不变的目标。然而,某些功能和效果往往会降低低端机器上的体验。通过基准信息,可以逐个用户地禁用某些效果(淡入淡出等),以增加属性/应用程序的体验。
如果您不知道这方面的任何信息,您对如何做到这一点有想法吗?
谢谢
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用
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 withsetInterval
, you're probably pushing the machine too hard, and should disable your animations.