Open
Conversation
5788190 to
0100ddb
Compare
lib/Db/MessageMapper.php
Outdated
Comment on lines
1330
to
1336
| $res = $qb->executeQuery(); | ||
| while ($row = $res->fetch()) { | ||
| $message = $this->mapRowToEntity($row); | ||
| if ($message->getThreadRootId() === null) { | ||
| $results[] = [$message]; | ||
| } else { | ||
| $results[] = $this->findThread($account, $message->getThreadRootId(), $sortOrder); |
Member
There was a problem hiding this comment.
I think the n+1 can be avoided with a subquery or self join
Member
There was a problem hiding this comment.
When called from getDatabaseSyncChanges I wonder if it's even necessary to fetch messages of the same thread. We already know the new IDs. Other messages are not relevant, are they?
lib/Db/MessageMapper.php
Outdated
Comment on lines
1399
to
1405
| $res = $qb->executeQuery(); | ||
| while ($row = $res->fetch()) { | ||
| $message = $this->mapRowToEntity($row); | ||
| if ($message->getThreadRootId() === null) { | ||
| $results[] = [$message]; | ||
| } else { | ||
| $results[] = $this->findThread($account, $message->getThreadRootId(), $sortOrder); |
Member
Member
6e22993 to
d2f326b
Compare
Member
Member
|
src/store/mainStore/actions.js
Outdated
Comment on lines
2165
to
2166
| const threadEnvelopes = this.threads[threadRootId] | ||
| const threadIdx = threadEnvelopes.indexOf(id) |
Member
There was a problem hiding this comment.
- BUG:
[ERROR] mail: Background sync failed: threadEnvelopes.indexOf is not a function
| view: this.getPreference('layout-message-view'), | ||
| })), | ||
| Promise.all.bind(Promise), | ||
| andThen(map(sliceToPage)), |
Member
There was a problem hiding this comment.
sliceToPage made sure that you always get 20 items, no matter how many mailboxes are combined.
I yet have to test it but I think without the slicing you will get 20 x number of accounts items back now.
Signed-off-by: Hamza <[email protected]>
Signed-off-by: Hamza <[email protected]>
Signed-off-by: Hamza <[email protected]>
Signed-off-by: Hamza <[email protected]>
Signed-off-by: Hamza <[email protected]>
fac228d to
ee4ce1f
Compare
Contributor
Author
|
Removed the merge and rebased instead + conflicts resolution for smoother squashing later, Pushing the fixes in a bit |
Signed-off-by: Hamza <[email protected]>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.







Ref #11065 (comment)