w3c / requestidlecallback

Cooperative Scheduling of Background Tasks
https://w3c.github.io/requestidlecallback/
Other
50 stars 19 forks source link

What should occur if requestIdleCallback backs up? #43

Closed toddreifsteck closed 7 years ago

toddreifsteck commented 8 years ago

Should the queue limit size or will it eventually run out of memory? This is an edge case but.. I can imagine it being a problem on a site that isn't tested on low end hardware.

rmcilroy commented 8 years ago

Personally I think creating unbounded rIC tasks without some feedback of when tasks have been run is a programming error, in the same way as creating unbounded setTimeout tasks or indeed unbounded objects of any type. In my opinion it is perfectly reasonable for such an error to cause OOMs and I don't think we should special case with an explicitly limit queue size in this instance but not for other situations where unbounded queues could be created.

igrigorik commented 7 years ago

Agree with @rmcilroy, we don't impose any such limits on setTimeout and friends, and I don't think this is something we should limit on rIC in particular either. I propose we close this with no action.

@toddreifsteck any objections? FWIW, it may be a worthwhile conversation at a higher level (i.e. perhaps we should have reasonable limits on all such mechanisms), but I think that's out of scope for this discussion and something we should direct to TAG if we believe this is a (big) problem.

toddreifsteck commented 7 years ago

No objections. Closing.