Skip to content

Conversation

@odesenfans
Copy link
Collaborator

The /messages endpoint returns the number of matching messages. As an optimization for the default case with no filters, we return an approximate (fast) count of the total number of messages, and accept the performance penalty when specifying filters.

The condition to determine whether we go through the fast path was weirdly designed (it depends on an empty kwargs) and new features introduced a bug where the fast path is never used anymore.

This currently happens because of start_block and end_block, but also message_statuses.

This PR fixes the issue for start/end blocks, the issue with message statuses requires more investigation.

The `/messages` endpoint returns the number of matching messages. As an
optimization for the default case with no filters, we return an
approximate (fast) count of the total number of messages, and accept the
performance penalty when specifying filters.

The condition to determine whether we go through the fast path was
weirdly designed (it depends on an empty `kwargs`) and new features
introduced a bug where the fast path is never used anymore.

This currently happens because of `start_block` and `end_block`, but
also `message_statuses`.

This PR fixes the issue for start/end blocks, the issue with message
statuses requires more investigation.
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.

1 participant