I think there was an earlier commit with a similar name but turns out
I'd only done foundational work in that commit and never actually
properly set it up. Of course once I did, there were several issues that
needed fixing to make it work correctly, but now it works as expected.
Heavily optimizes larger projects by allowing cache jobs to only copy
what has changed.
While the auto-cache will always default to on, there are cases where the
user may not want the viewer to barrel ahead caching something (footage
viewer for instance or if the user is making a lot of changes in a short
amount of time).
The viewer playback used to rely primarily on the vsync, which was
extremely smooth, but had issues when there was only audio or the viewer
was hidden. This was bodged by attaching to the audio in these scenarios,
but still not perfect.
Now we run a timer in tandem with vsync for the best of both worlds.
Playback is no longer wholly reliant on vsync, yet the viewer can remain
as smooth as possible using vsync.
Also moves "ForceUpdate" to a queued connection so it occurs as soon as
the rest of the processing is done. This ensures the viewer isn't updated
too early.
Viewers are now more aware of each other and can pause each others' cache tasks
when one of them plays, as well as wait for other viewers' cache tasks to
finish before starting their own.
Implemented a smarter auto-cache that's context sensitive. Caching will
automatically pause when playback begins or values are being changed and resume
when inactive.
Improves minor issues with frame queue implemented in earlier commit. Also links
ViewerWindow with the queue and a separate timer to make it much smoother.
Rather than have to decode EXRs and display them in the span of one frame,
decode into memory ahead of time so that they're ready for upload. Has the
potential to speed up playback by about 5-6x.
A huge optimization that ensures only the parts of a node graph that have
changed get pushed to the renderer. For thread-safety, the node graph is
copied elsewhere so that users can make changes asynchronously and the graph
can update when its threads are ready. Up until now, if an input value changed,
every node's values would be re-copied, or worse, if a connection was changed,
the entire graph would be recopied. This has been negligible in testing since
we've been largely testing with small graphs, but for massive projects, it's
important that this be as optimized as possible.