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

fix: Improve message sending performances #14800

Merged
merged 2 commits into from
Mar 10, 2023
Merged

fix: Improve message sending performances #14800

merged 2 commits into from
Mar 10, 2023

Conversation

atomrc
Copy link
Contributor

@atomrc atomrc commented Mar 10, 2023

Since #14632 we never query individual events by their direct index (the id).
Instead we load all the events and go through them one by one until we find the matching ID (or replacing ID).

This is very suboptimal and gets slower and slower as more messages are added to the conversation.

We will still need to optimize loading quotes. But this should fix many performances problems

after.mov
before.mov

Should fix wireapp/wire-desktop#6486

Comment on lines 139 to 140
this.storageService.db
.table(StorageSchemata.OBJECT_STORE.EVENTS)
Copy link
Contributor

Choose a reason for hiding this comment

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

Move this to variable maybe ? You getting this table 2 times :)

@codecov
Copy link

codecov bot commented Mar 10, 2023

Codecov Report

Merging #14800 (7c9ae60) into dev (0a0b3c3) will decrease coverage by 0.01%.
The diff coverage is 60.00%.

@@            Coverage Diff             @@
##              dev   #14800      +/-   ##
==========================================
- Coverage   42.80%   42.80%   -0.01%     
==========================================
  Files         621      621              
  Lines       21225    21228       +3     
  Branches     4870     4871       +1     
==========================================
+ Hits         9085     9086       +1     
- Misses      10981    10982       +1     
- Partials     1159     1160       +1     

@atomrc atomrc enabled auto-merge (squash) March 10, 2023 12:13
@atomrc atomrc merged commit 2b0bef9 into dev Mar 10, 2023
@atomrc atomrc deleted the fix/send-perf branch March 10, 2023 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

latest update - long delay after pressing enter/send before outgoing message appears
4 participants