Closed Bug 22102 Opened 25 years ago Closed 16 years ago

Load next message before performing IMAP delete/move

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Bienvenu, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: perf)

Attachments

(1 file)

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
accepting
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.
Blocks: 9161
QA Contact: lchiang → suresh
Whiteboard: [perf]
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]
move perf to summary
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
Adding perf to keyword field.
not going to make it for beta. Too bad.
Target Milestone: M15
moving to m16
Target Milestone: M15 → M16
Not M16 stopper.  Marking M17.
Target Milestone: M16 → M17
I don't think this is going to happen in 5.0
Target Milestone: M17 → M30
Target Milestone: M30 → Future
moving to future milestone.
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
adding mail3 keyword
Keywords: mail3
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.
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.
moving to mozilla0.9 and marking nsbeta1+.
Keywords: nsbeta1
Priority: P3 → P1
Whiteboard: [nsbeta1+]
Target Milestone: Future → mozilla0.9
moving to mozilla0.8 milestone.
Target Milestone: mozilla0.9 → mozilla0.8
moving to mozilla0.9
Target Milestone: mozilla0.8 → mozilla0.9
marking nsbeta1- and moving to future.
Keywords: nsbeta1nsbeta1-
Whiteboard: [nsbeta1+] → [nsbeta1+ 2/13]
Target Milestone: mozilla0.9 → Future
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?
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.
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
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
David,

this bug still applies? maybe its outdated and can be closed.
Assignee: bienvenu → nobody
Status: ASSIGNED → NEW
OS: Other → All
Priority: P1 → --
QA Contact: stephend → backend
Whiteboard: [nsbeta1+ 2/13]
Target Milestone: Future → ---
fixed by bug 435153
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: