quantranhong1999 commented on PR #2928: URL: https://github.com/apache/james-project/pull/2928#issuecomment-3833674327
For the record, we did run a james-gatling performance test to compare **the scroll search (before)** vs **the from/size pagination (after)**. ### scroll search <img width="1306" height="425" alt="image" src="https://github.com/user-attachments/assets/4a6bfa7c-493a-4738-b147-5c9ffb4d1e1f" /> ### from/size pagination <img width="2030" height="850" alt="image" src="https://github.com/user-attachments/assets/925c4f24-2533-4fe3-8abc-12c3fbbbe938" /> Email/query seems on bar with the scroll search (https://github.com/linagora/james-project-private/issues/1149), but better MAX response time (595ms vs 894ms). However, the result is not really representative: in our JMAP performance test scenario, we do Email/query on a random keyword, which should return very few results. Also, the scroll context is closed asynchronously in the current code CF https://github.com/apache/james-project/blob/bfc994cdf5a9cf9d60a6377df4f8c02267b09fde/backends-common/opensearch/src/main/java/org/apache/james/backends/opensearch/search/ScrolledSearch.java#L117 This explains similar results. We imagine we would need to go > 25 rqs on emailQuery to see significant improvements. But the gains are obvious, so we won't investigate deeper in the performance test: - 1 round trip vs multiple round trips - only getting exactly what we need vs over-fetch (even worse when deep paging) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
