Load next message before performing IMAP delete/move

RESOLVED FIXED

Status

RESOLVED FIXED
19 years ago
10 years ago

People

(Reporter: Bienvenu, Unassigned)

Tracking

(Blocks: 1 bug, {perf})

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

19 years ago
In 4.5, when the user deleted an imap message, we would store an offline delete
and load the next message; then playback the offline delete. This bug is to do
the same thing in 5.0
(Reporter)

Comment 1

19 years ago
accepting
(Reporter)

Comment 2

19 years ago
Created attachment 3619 [details] [diff] [review]
speed up delete to trash for imap
(Reporter)

Comment 3

19 years ago
I found a speedup for deleting imap messages - we were updating the source
folder each time, which can be expensive when the folder is large. The patch
changes delete to run the copy message process through the destination folder,
as God and Jeff intended.

Updated

19 years ago
Blocks: 9161
QA Contact: lchiang → suresh
Whiteboard: [perf]
(Reporter)

Updated

19 years ago
Summary: speed up imap delete and next message load by loading next message before the delete → [perf] speed up imap delete and next message load by loading next message before the delete
Whiteboard: [perf]
(Reporter)

Comment 4

19 years ago
move perf to summary

Updated

19 years ago
Keywords: perf
Summary: [perf] speed up imap delete and next message load by loading next message before the delete → speed up imap delete and next message load by loading next message before the delete

Comment 5

19 years ago
Adding perf to keyword field.
(Reporter)

Comment 6

19 years ago
not going to make it for beta. Too bad.
Target Milestone: M15
(Reporter)

Comment 7

19 years ago
moving to m16
Target Milestone: M15 → M16

Comment 8

19 years ago
Not M16 stopper.  Marking M17.
Target Milestone: M16 → M17
(Reporter)

Comment 9

19 years ago
I don't think this is going to happen in 5.0
Target Milestone: M17 → M30

Updated

19 years ago
Target Milestone: M30 → Future

Comment 10

19 years ago
moving to future milestone.

Comment 11

18 years ago
Resummarizing for brevity.

Once this one-stage queuing of deletes/moves is implemented, the next step would
be to allow multiple deletes/moves to be in the queue at once, with the first
action from the queue being played back if there were no message loads pending
(that is, message loads for messages which hadn't already been deleted).
Keywords: 4xp
Summary: speed up imap delete and next message load by loading next message before the delete → Load next message before performing IMAP delete/move
(Reporter)

Comment 12

18 years ago
adding mail3 keyword
Keywords: mail3

Comment 13

18 years ago
How big do you think the performance impact would be on this? I always thought
the problem was that we want to prevent loading the message just in case the
user was deleting really quickly.
(Reporter)

Comment 14

18 years ago
the perceived performance impact will be the time it takes to do a delete
message url, so it will vary based on the connection speed, turnaround latency,
etc. The reason we want to do this is that to the user the next message will
start loading immediately. In 4.x, this was done by storing the delete as an
offline operation so that we would not lose track of the fact that the user
wanted to delete the message if something went wrong during the loading of the
message.

Comment 15

18 years ago
moving to mozilla0.9 and marking nsbeta1+.
Keywords: nsbeta1
Priority: P3 → P1
Whiteboard: [nsbeta1+]
Target Milestone: Future → mozilla0.9

Comment 16

18 years ago
moving to mozilla0.8 milestone.
Target Milestone: mozilla0.9 → mozilla0.8

Comment 17

18 years ago
moving to mozilla0.9
Target Milestone: mozilla0.8 → mozilla0.9

Comment 18

18 years ago
marking nsbeta1- and moving to future.
Keywords: nsbeta1 → nsbeta1-
Whiteboard: [nsbeta1+] → [nsbeta1+ 2/13]
Target Milestone: mozilla0.9 → Future

Comment 19

18 years ago
Would it be at all possible to halt the load of a message then proceed to delete
it when the user hits delete? This would speed things up tremendously as now the
message has to be fully loaded and displayed before a delete is processed.

I've been looking through the imap code to see how one might do this but I've
not really found anything 'good' so far. Any pointers?
(Reporter)

Comment 20

18 years ago
yes, it's possible to do what you want - what we need to do is issue a pseudo
interrupt of the message load when delete is pressed. When we fetch messages, we
fetch them in chunks based on your connection speed from 5K -> 40K or more. What
a  pseudo interrupt is to simply read the current chunk and don't ask for any
more. This is opposed to a real interrupt, which is what happens when you press
stop, in which we kill the connection. We don't want to kill the connection in
this delete case because it would be more expensive to rebuild the connection
and folder selection state.

So, currently, if you click on a large message, then click on an other message,
we pseudo interrupt the first message load. We would just need to do this same
thing for when delete is pressed. Look at calls to PseudoInterruptMsgLoad. Hope
this helps.

Comment 21

18 years ago
Sorry for the spam. These are just notes for myself to help me understand whats
going on when a message interrupted.

Have a message loaded fully, then hit "down-arrow, down-arrow":
  In nsImapService::DisplayMessage
  In nsImapService::FetchMessage
  In nsImapProtocol::PseudoInterruptMsgLoad
  interrupt msg load : FALSE
  End nsImapService::FetchMessage
  In nsImapService::DisplayMessage
  In nsImapService::FetchMessage
  In nsImapProtocol::PseudoInterruptMsgLoad
  interrupt msg load : TRUE
  End nsImapService::FetchMessage

Have a message loaded fully, then hit "down-arrow, delete":
  In nsImapService::DisplayMessage
  In nsImapService::FetchMessage
  In nsImapProtocol::PseudoInterruptMsgLoad
  interrupt msg load : FALSE
  In nsImapProtocol::PseudoInterruptMsgLoad
  interrupt msg load : FALSE
  End nsImapService::FetchMessage
  In nsImapMailFolder::DeleteMessages

  In nsImapService::DisplayMessage
  In nsImapService::FetchMessage
  In nsImapProtocol::PseudoInterruptMsgLoad
  interrupt msg load : FALSE
  In nsImapProtocol::PseudoInterruptMsgLoad
  interrupt msg load : FALSE
  End nsImapService::FetchMessage

Comment 22

18 years ago
The more that I've looked into this - it seems that PseudoInterruptMsgLoad is
being called properly and it is working. I'm not sure if what I was seeing
before was a problem with a slow internet connection or what.
QA Contact: suresh → stephend
Product: MailNews → Core

Comment 23

13 years ago
David,

this bug still applies? maybe its outdated and can be closed.

Updated

12 years ago
Blocks: 47645

Updated

11 years ago
Assignee: bienvenu → nobody
Status: ASSIGNED → NEW
OS: Other → All
Priority: P1 → --
QA Contact: stephend → backend
Whiteboard: [nsbeta1+ 2/13]
Target Milestone: Future → ---
(Reporter)

Comment 24

10 years ago
fixed by bug 435153
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
(Assignee)

Updated

10 years ago
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.