Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚡️ Simplify and speed up SEARCH response parsing #238

Merged
merged 1 commit into from
Nov 25, 2023

Conversation

nevans
Copy link
Collaborator

@nevans nevans commented Nov 25, 2023

The mailbox-data SEARCH response parser was refactored, as part of the work on CONDSTORE support. This commit contains only the refactoring, which (coincidentally) brings a significant speed improvement:

invalid_search_response_multiple_result_with_trailing_space
                v0.4.6-2-g3ac9912:     70865.1 i/s
                            0.4.6:     49505.1 i/s - 1.43x  slower

invalid_search_response_single_result_with_trailing_space
                v0.4.6-2-g3ac9912:     74398.0 i/s
                            0.4.6:     67791.1 i/s - 1.10x  slower

rfc3501_7.2.5_SEARCH_response_example
                v0.4.6-2-g3ac9912:     65968.9 i/s
                            0.4.6:     53490.9 i/s - 1.23x  slower

search_response_multiple_seq_nums_returned
                v0.4.6-2-g3ac9912:     62777.4 i/s
                            0.4.6:     47852.3 i/s - 1.31x  slower

search_response_single_seq_nums_returned
                v0.4.6-2-g3ac9912:     79656.5 i/s
                            0.4.6:     69234.9 i/s - 1.15x  slower

search_response_with_condstore_modseq
                v0.4.6-2-g3ac9912:     55376.4 i/s
                            0.4.6:     39129.0 i/s - 1.42x  slower

The `mailbox-data` `SEARCH` response parser was refactored, as part of
the work on `CONDSTORE` support.  This commit contains only the
refactoring, which (coincidentally) brings a significant speed
improvement:

```
invalid_search_response_multiple_result_with_trailing_space
                v0.4.6-2-g3ac9912:     70865.1 i/s
                            0.4.6:     49505.1 i/s - 1.43x  slower

invalid_search_response_single_result_with_trailing_space
                v0.4.6-2-g3ac9912:     74398.0 i/s
                            0.4.6:     67791.1 i/s - 1.10x  slower

rfc3501_7.2.5_SEARCH_response_example
                v0.4.6-2-g3ac9912:     65968.9 i/s
                            0.4.6:     53490.9 i/s - 1.23x  slower

search_response_multiple_seq_nums_returned
                v0.4.6-2-g3ac9912:     62777.4 i/s
                            0.4.6:     47852.3 i/s - 1.31x  slower

search_response_single_seq_nums_returned
                v0.4.6-2-g3ac9912:     79656.5 i/s
                            0.4.6:     69234.9 i/s - 1.15x  slower

search_response_with_condstore_modseq
                v0.4.6-2-g3ac9912:     55376.4 i/s
                            0.4.6:     39129.0 i/s - 1.42x  slower
```
@nevans nevans merged commit 38d7530 into ruby:master Nov 25, 2023
11 checks passed
@nevans nevans deleted the parser/better-faster-search-data branch November 25, 2023 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant