Closed wilsonpage closed 11 years ago
We could measure time elapsed in a batch, and schedule remaining work for the next frame if we exceed an 'agreed' threshold (30/60 fps).
By default we could make this threshold 16ms (60fps), but give users the option to increase this if they wish.
fastdom.set({ threshold: 32 });
This could be a concern that depending on the performance of the device work could end up being done on different frames. This could lead to FastDom introducing device specific bugs (not nice). This is something that should be considered.
This is out of scope of FastDom. The new way of calling .defer()
without any frames
argument solves some of the problems mentioned here.
A new API called batch would give a way for devs to create a a new batcher with a size limit. Let me explain with an example:
First frame
Second Frame
Is this something that should be automated inside the standard
.read
and.write
API?