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

Mail: Persons tab creates huge number of DB requests #374

Closed
benbucksch opened this issue Jan 13, 2025 · 1 comment
Closed

Mail: Persons tab creates huge number of DB requests #374

benbucksch opened this issue Jan 13, 2025 · 1 comment
Assignees

Comments

@benbucksch
Copy link
Collaborator

Nick wrote:

Reproduction

  1. Mail
  2. People tab
  3. Select a person
  4. Select an email from that person

Actual result

  • The email selection triggers 500,000 ws requests

Expected result

  • The email selection triggers 1 DB requests

Related

Compare bug #368

@nix-universe
Copy link
Collaborator

nix-universe commented Jan 15, 2025

Two important things.
First, I don't think, we should expect exactly one db request. As far as I understand, multiple update/delete/select requests might be legitimately triggered.

Second, and most importantly, selecting a folder still triggers thousands of requests like:

DELETE FROM emailPersonRel WHERE emailID = ...
SELECT id FROM emailPerson WHERE emailAddress = ... AND name = ...
INSERT OR IGNORE INTO emailPerson (name, emailAddress, personID) VALUES ...
INSERT INTO emailPersonRel (emailID, emailPersonID, recipientType) VALUES ...

What is particularly interesting, is that there are patterns like this.
There is a request to delete a given emailID from emailPersonRel, followed soon (+4 requests ids) by a request to insert a record with the same emailID into emailPersonRel. There are some select/insert requests to emailPerson in between.

The good thing is that the app doesn't become irresponsive and the total number of requests issued is less than before but there is still a room for improvement.
So, let's keep the issue open for further analysis.

P.S. Many jpc requests are being sent on cursor move over the email body. Is that needed?

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

No branches or pull requests

2 participants