Closed Bug 147285 Opened 24 years ago Closed 23 years ago

Mass copy of messages from local to IMAP folder is slow

Categories

(MailNews Core :: Networking: IMAP, defect)

x86
Windows XP
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: chrisbolt, Assigned: Bienvenu)

References

Details

I've decided to try out IMAP, so I start to copy my sent folder (~2100 messages) from the local account to the Sent folder on my IMAP server. I select all messages and click Message | Copy | <Sent folder on IMAP server> but it only seems to copy about 2 messages per second, occasionally 3. Transfer never goes above 50 k/s. IMAP server is on a 100 mbit LAN. When I strace the server process, it pauses waiting for input from the client: write(1, "1448 OK APPEND Ok.\r\n", 20) = 20 gettimeofday({1022469758, 117815}, NULL) = 0 gettimeofday({1022469758, 119293}, NULL) = 0 select(1, [0], NULL, NULL, {1800, 0} User-Agent: 1.0 rc3
probably a dup of 129495 - when the fix gets checked in for that (when the mozilla trunk re-opens), you should retry this.
QA Contact: huang → gchan
have you tried this with a trunk build? It should be quite a bit faster now.
with build 2002090408 on NT it is very slow! For 15 minutes, only about 500 messages were copied. It continues the operation. I tried to copy about 2000 messages. Is the fix for bug 129495 backed off?
no, that hasn't been backed out, and it definitely speeds things up for non-uid plus servers. Appending local msgs to an imap folder is definitely slow - I don't know if it's because we copy each msg to a temp file first, or what's going on. I'll look at a protocol log and see.
I can confirm this problem. IMAP access on Mozilla is still slow, in many different respects. It not only occurs when moving many messages from one folder to another, but also when opening a large attachment within a message stored on an IMAP server. It is not a processor or network loading issue, the client and server processor and the network all sit at very low usage levels while the message is transferred very slowly. Look using a network analyzer (tcpdump, tethereal) and you can almost read along.
*** Bug 197468 has been marked as a duplicate of this bug. ***
I just tried copy a large message with 1.4b on Windows and Linux and observe that this problem still exists on Windows-only: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030507 It's something that crept in after 1.1 as mentioned in bug 197468 which I just closed as a duplicate of this. The problem is trivial to reproduce and as Rob Janssen noted in March it's not a loading issue - my Win2K machine sits next to Linux but runs 5-10 times slower. I don't feel this is a minor problem any more as use of IMAP is spreading and even single mail messages can be large now. Would you please consider changing the priority?
I agree that it is not, or no longer is, a minor problem. Something should be done about this as it is affecting the users more and more. (we recently upgraded a number of workstations to 2GHz P4 and the LAN to fully switched 100 Mbps with a 1Gbps server and now I can no longer explain a 2MB doc to be loaded in more than an instant...) Checking all other related bugs, but not knowing the internals of Mozilla, I get the impression that there is some internal scheduler in Mozilla that is waiting for the next event that it has to act upon. And somehow the arrival of new IMAP data is not seen as an event by this scheduler. It seems like the scheduler gets woken up by some timer event (a couple of times per second), not by the actual arrival of network data, and thus the rate at which it reads IMAP data is fixed and not related to the processor speed, network speed, etc. This would explain why it is slow even while everything is lightly loaded (as seen by taskmanager.exe on the client, LAN analyzer like tethereal, "top" on the server). Users of IMAP over a modemline will probably notice nothing, while users with an IMAP server on a LAN will have relatively slow performance.
I can confirm this happens on 2003060704 (WinXP)
Status: UNCONFIRMED → NEW
Ever confirmed: true
taking
Assignee: mscott → bienvenu
Blocks: 149222
Hmmmm....just installed 1.5b on Windows and this seems to be much better and perhaps completely healed. I was able to move a test message with a 10MB attachment back and forth freely: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030827
can anyone else confirm that this is faster for them in 1.5b? I did check in some significant performance fixes.
Is this maybe also related to the issue discussed in bug 216374? I will check 1.5b on a Win2000 system soon.
No, bug 216374 is because we're fetching the message in small chunks (not sure why that is) and this bug does not involve message fetching but rather appending.
marking fixed based on gerth@stanford.edu's comment and the lack of any other comments.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.