How can I test the user's computer's processing power using Javascript?

前端 未结 3 1775
眼角桃花
眼角桃花 2021-01-02 12:32

I made a pretty CPU intensive webpage with lots of CSS3 and Javascript. I want to use Javascript to test if the user\'s computer is capable of handling the scripts. I think

3条回答
  •  再見小時候
    2021-01-02 13:20

    There are ways to assess the CPU or graphics capabilities of the host computer using javascript. For example, you could run a set of iterations using those operations and measure the time from beginning to end.

    In general, it's not that useful to just try to measure a single CPU performance number as it's much more important to measure exactly what your critical operations are.

    For example, if you're concerned with a certain type of graphics rendering, you can do a sample animation and see how many frames can be rendered in a particular time.

提交回复
热议问题