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

Remove the compare function from utils #4315

Merged
merged 4 commits into from
Jul 17, 2024
Merged

Remove the compare function from utils #4315

merged 4 commits into from
Jul 17, 2024

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Jul 16, 2024

and change the one use of it to just intantiate a collator and use it.

This was marked as internal module so this shouldn't be a breaking change. Of course, react-sdk was using it.

Requires: matrix-org/matrix-react-sdk#12782

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • Sign-off given on the changes (see CONTRIBUTING.md).

and change the one use of it to just intantiate a collator and use
it.

This was marked as internal module so this shouldn't be a breaking change.
Of course, react-sdk was using it.

Requires: matrix-org/matrix-react-sdk#12782
@dbkr dbkr added the T-Task Tasks for the team like planning label Jul 16, 2024
@dbkr dbkr marked this pull request as ready for review July 16, 2024 11:39
@dbkr dbkr requested a review from a team as a code owner July 16, 2024 11:39
Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

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

The singular collator choice was done to fix a performance issue, please prove that this does not regress that via some performance test comparisons

See f708c47

otherwise we aren't testing anything different
@dbkr
Copy link
Member Author

dbkr commented Jul 16, 2024

New test passes in somewhere around 80ms on my machine, same as with the old code, so instantiating another collator for each sort operation doesn't appear to materially affect things.

@dbkr dbkr requested a review from t3chguy July 16, 2024 17:18
@t3chguy
Copy link
Member

t3chguy commented Jul 16, 2024

@dbkr worth testing in browsers, given that is where the performance issue was

Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

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

See comment

@dbkr
Copy link
Member Author

dbkr commented Jul 17, 2024

Tested on my big(ish) test account - no measurable difference between develop and this PR.

@dbkr dbkr added this pull request to the merge queue Jul 17, 2024
Merged via the queue into develop with commit 6f63ff1 Jul 17, 2024
26 checks passed
@dbkr dbkr deleted the dbkr/remove_compare branch July 17, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Tasks for the team like planning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants