Skip to content

Qt: update cache implementation using "diff-util'" algorithm

Pierre Lamot requested to merge chub/vlc:qt/ml-cache-update into master

This allows to submit to the view only the changes made on the model when the database changes instead of invalidating and resetting the whole view.

cache is changed from a windowed view over the data, to a model where data loaded from the start and loaded by chunk (append to the cache), when data is invalidated the data is reloaded in background and the difference (insertions and deletions) are propagated to the view.

A "move" detection step is also implemented, this allows to match an addition with a corresponding deletion to generate a move event instead. Though this variant is not enabled by default with Qt models as most of the current models wouldn't generate this kind of event.

the diff algorithm is provided aside from Qt so it can be used for other purpose (other UI for instance)

Merge request reports