you are viewing a single comment's thread.

view the rest of the comments →

[–]x0x7 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (0 children)

Determining the cpu level might be expensive per page render and any means that isn't isn't going to be very fine resolutioned and therefore would be resonant.

A solution would be to have a rolling array of the timestamps of each of the last 15 renders. If the oldest of the last 15 is very new then let the page cache longer. That's assuming you have a cache in the first place though.

Then basically you can set a maximum frequency that your rendering engine will work at that you know your cpu can't surpassed anyway so you might as well not queue the task, and just defer to cache for one more request.

If you were using nodejs I could show you how to do it.