Skip to content

Conversation

@quantranhong1999
Copy link
Member

Also, modify the search API with SearchOptions and push the offset onto the search engine.

Copy link
Contributor

@chibenwa chibenwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicks along the way but IMO it really goes into the right direction

Copy link
Contributor

@Arsnael Arsnael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read it, nothing to add.

Copy link
Contributor

@chibenwa chibenwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work !

Here are some little comments to polish it further.

I also identified some search related issues but those are to be addressed separately.

@quantranhong1999
Copy link
Member Author

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

image

from/size pagination

image

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

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)

@Arsnael
Copy link
Contributor

Arsnael commented Feb 3, 2026

@quantranhong1999
Copy link
Member Author

@quantranhong1999
Copy link
Member Author

Failure tests are not related to this work. It seems failing on master (without the build cache).

Actually, these failed on my Mac (notable for not being fully compatible with docker engine), but passed on my Ubuntu PC (docker engine v28.3.3).

I do not understand what is going on. Will try to rerun the CI.

@quantranhong1999 quantranhong1999 force-pushed the jmap-search-api-refactoring branch from c7c30e8 to 14af0b4 Compare February 3, 2026 12:22
@quantranhong1999
Copy link
Member Author

Green build! I squashed the fixup.

@chibenwa chibenwa merged commit d7d1e58 into apache:master Feb 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants