Opened 13 years ago
Closed 12 years ago
#9790 closed enhancement (fixed)
Selectively reindex needed files when changeset_added
Reported by: | ejucovy | Owned by: | ejucovy |
---|---|---|---|
Priority: | normal | Component: | MultiRepoSearchPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description
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.
The 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.
Fixed in fa80c12b23cd8f938474ae34be8759e9b518b51e