Closed Bug 108077 Opened 24 years ago Closed 20 years ago

Optimization in nsMsgCopyService::CopyMessages()

Categories

(MailNews Core :: Backend, defect)

Other
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID
mozilla1.0.1

People

(Reporter: hwaara, Assigned: hwaara)

Details

Attachments

(1 file)

In CopyMessages, there's a for-loop that: * iterates through all elements in a nsISupportsArray argument * splits it up into nsISupports objects * QIs every object into a nsIMsgDBHdr* * pass every object to nsCopySource::AddMessage() Then AddMessage() does the exact opposite. It QIs back into a nsISupports* and adds it into another nsISupportsArray. My optimization is to assign the nsISupportsArray argument directly into the last nsISupportsArray, to skip all this stuff.
Comment on attachment 56145 [details] [diff] [review] Fix -- Add nsCopySource::AddMessages() r=naving, Could you try deleting multiple local messages and see everything works ok. Also look out for other code where we go through copyService. I know deleting local messages does.
Attachment #56145 - Flags: review+
this will have no appreciable performance impact (sorry, a couple QI's compared to the time it takes to move/copy an imap or local message is just not going to matter) and I don't really have the time to make sure you're doing the right thing.
Very nice
I totally agree w/ bienvenu - there will be no appreciable performance gain.
saving a few QIs isn't going to amount to much in this scenario. hwaara, convince yourself that it's not. I haven't looked carefully, but I'm not sure that patch is correct either.
I think it's good cleanup... but as you say perhaps it doesn't make much different in footprint/performance world -- just good old code cleanup. I'm fine with landing it post-lockup.
Assignee: mscott → hwaara
Target Milestone: --- → mozilla0.9.9
Due to internal problems with my computer, I don't know when I'll get back to this bug. Feel free to attach a patch -- I'll review it. Changing target milestone for now.
Target Milestone: mozilla0.9.9 → mozilla1.0.1
Product: MailNews → Core
This bug expired a long, long time ago.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Product: Core → MailNews Core
Commit pushed to master at https://github.com/mozilla/kuma https://github.com/mozilla/kuma/commit/93d35d34746e88fdb13141d01f4dfc22229d4825 bug 108077 - Updates to demo detail control buttons and listing title colors
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: