Page MenuHome

VSE: cache performance optimization
ClosedPublic

Authored by Richard Antalik (ISS) on Nov 4 2020, 10:19 PM.

Details

Summary

Map frame for cached raw images to strip input media frame range. This
means that static images or extended frame range of movies will only
generate one cache entry.

cfra is stored in cache key as a reference - on what frame was this
entry created, so we don't have to reverse lookup frame range.

Since each media frame corresponds to one cache frame with same frame
index key, there is no need to invalidate raw cache when changing time
remapping properties like use_reverse_frames or strobe

No changes are needed for disk cache, since invalidating raw entry
assumes all data will be invalidated.

Diff Detail

Repository
rB Blender

Event Timeline

Richard Antalik (ISS) requested review of this revision.Nov 4 2020, 10:19 PM
Richard Antalik (ISS) created this revision.

This patch also depends on D9439. I started refactoring before working on this patch, because I thought this will be more complicated and prior cleanup would help. That wasn't the case however, so I can "rebase" this on master.

Rebase - hide style issue from base branch

The description sounds fantastic!
Would be really nice to test it as well, but there are some dependencies which makes it not-so-trivial at this time.

From the reading the change, good thing is that it seems to be really isolated. The constant confusion when reading the code though is the cfra and nfra. Can they become more descriptive, preferably with description in the mapping function what input and output is "measured" in.

Does this also improves situation when there is, say, Adjustment layer on top of single image, prolonged to 100 frames?

The description sounds fantastic!
Would be really nice to test it as well, but there are some dependencies which makes it not-so-trivial at this time.

Yeah, sorry for that.

From the reading the change, good thing is that it seems to be really isolated. The constant confusion when reading the code though is the cfra and nfra. Can they become more descriptive, preferably with description in the mapping function what input and output is "measured" in.

I will change cfra and nfra to something more descriptive

Does this also improves situation when there is, say, Adjustment layer on top of single image, prolonged to 100 frames?

Yes, it should improve all workflows

  • rebase on master, so arc isn't confused when applying patch
  • Fix empty string in RNA update func

Unfortunately, don't currently have time to do actual test. Will trust you on that, and on being around to keep an eye on possible outcomes of the change ;)

This revision is now accepted and ready to land.Nov 5 2020, 2:34 PM
This revision was automatically updated to reflect the committed changes.