Improve obsolete pipecache handling#21572
Open
jenshannoschwalm wants to merge 2 commits into
Open
Conversation
Currently we use `gboolean cache_obsolete` to enforce a complete invalidation of the pipe's cache before the **next** pixelpipe run. We had that for years, it was introduced and required as a workaround while the hash calculation for piece and cachelines were not "complete". Using the flag leads to bad UI response as a reprocessed pipe will never get a cacheline hit. Instead of using a `gboolean` we now have `uint32_t cache_obsolete_order`, defaulting to INT_MAX. If set to anything below, the cachelines with `iop_order >= cache_obsolete_order` will be invalidated before the next pixelpipe run. This allows a finer control for what cachelines shouldn't be used for a cache-hit thus we have a clearly faster response in many situations triggered by the user. Two helpers were modified, both take the iop_order as an extra argument, note that using an iop_order of `0` will do a complete cache flush (as we had with the old gboolean). `void dt_dev_reprocess_center(dt_develop_t *dev, const int32_t iop_order)` `void dt_dev_reprocess_preview(dt_develop_t *dev, const int32_t iop_order)`
1. Request for details mask 2. Selecting a history item in history lib both require cacheline invalidations, simplyfied code in both cases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently we use
gboolean cache_obsoleteto enforce a complete invalidation of the pipe's cache before the next pixelpipe run.We had that for years, it was introduced and required as a workaround while the hash calculation for piece and cachelines were not "complete". Using this flag leads to bad UI response as a reprocessed pipe will never get a cacheline hit after obsolete.
Instead of using a
gbooleanwe now haveuint32_t cache_obsolete_order, defaulting to INT_MAX.If set to anything below, only the cachelines with
iop_order >= cache_obsolete_orderwill be invalidated before the next pixelpipe run.This allows a fine control for what cachelines shouldn't be used for a cache-hit thus we have a clearly faster response in many situations triggered by the user.
Two helpers were modified, both take the iop_order as an extra argument, note that using an iop_order of
0will do a complete cache flush (as we had with the old gboolean).void dt_dev_reprocess_center(dt_develop_t *dev, const int32_t iop_order)void dt_dev_reprocess_preview(dt_develop_t *dev, const int32_t iop_order)