Current implementations of XWikiVersioningStoreInterface do not provide any method to only fetch a subset of the versions from the history a given document. In order to access a specific version, the only way right now is to fetch all the versions and then filter them. Also, the only way right now to count the total number of versions is to fetch them and then count them. This leads to performance issues in some cases, such as https://jira.xwiki.org/browse/XWIKI-9046 or https://jira.xwiki.org/browse/XWIKI-9961. The interface should provide methods that include filtering criteria, both for fetching specific versions, and also to count the number of existing versions. |