Selectively reindex needed files when changeset_added
|Reported by:||ejucovy||Owned by:||ejucovy|
Currently the plugin's
changeset_added method performs a full reindex on the repository that the event was fired on. For large repositories this will be very expensive.
changeset_added method contains data about what files were added, modified or removed. So it should be possible for the plugin to selectively reindex only those files that were impacted by the newly added changeset.
The implementation should probably involve passing the extra data from
changeset_added to the search backend's
reindex_repository method (as new optional arguments to that method) rather than adding a new
reindex_repository_files method -- depending on the search backend used, a partial reindexing may or may not be possible, and I think you'd always want to perform the smallest reindex possible.