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

chore: Improve performance of users.listByStatus on some circumstances #33937

Merged
merged 4 commits into from
Nov 20, 2024

Conversation

KevLehman
Copy link
Contributor

@KevLehman KevLehman commented Nov 11, 2024

Proposed changes (including videos or screenshots)

  • Removes $or filters when no filter is provided, reducing time on returning first page (when the $or clause was passed, even when empty, Mongo was trying to match the regexes against the indexes, making it slow)
  • Adds a new partial index to support the active users query, improving speed

Issue(s)

https://rocketchat.atlassian.net/browse/CORE-500

Steps to test or reproduce

Further comments

Copy link
Contributor

dionisio-bot bot commented Nov 11, 2024

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Nov 11, 2024

⚠️ No Changeset found

Latest commit: ca83c4a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Nov 11, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-33937/
on branch gh-pages at 2024-11-19 23:28 UTC

Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.85%. Comparing base (de6bd32) to head (ca83c4a).
Report is 4 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #33937   +/-   ##
========================================
  Coverage    75.85%   75.85%           
========================================
  Files          509      509           
  Lines        22026    22026           
  Branches      5381     5381           
========================================
  Hits         16707    16707           
  Misses        4674     4674           
  Partials       645      645           
Flag Coverage Δ
unit 75.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

---- 🚨 Try these New Features:

@KevLehman KevLehman changed the title chore: Improve performance of listByStatus on some circumstances chore: Improve performance of users.listByStatus on some circumstances Nov 11, 2024
@KevLehman KevLehman marked this pull request as ready for review November 11, 2024 17:57
@KevLehman KevLehman requested a review from a team as a code owner November 11, 2024 17:57
@MarcosSpessatto MarcosSpessatto added this to the 7.1.0 milestone Nov 12, 2024
@KevLehman KevLehman added the stat: QA assured Means it has been tested and approved by a company insider label Nov 19, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Nov 19, 2024
@ggazzo ggazzo merged commit 8e5c430 into develop Nov 20, 2024
47 of 49 checks passed
@ggazzo ggazzo deleted the chore/perf-userslist branch November 20, 2024 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge subj: performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants