Closed
Bug 218874
Opened 21 years ago
Closed 21 years ago
Make IMAP use blocking reads
Categories
(MailNews Core :: Networking: IMAP, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Bienvenu, Assigned: Bienvenu)
References
Details
Attachments
(1 file, 1 obsolete file)
22.89 KB,
patch
|
darin.moz
:
review+
mscott
:
superreview+
|
Details | Diff | Splinter Review |
Since the imap protocol code is on its own thread, it can use blocking reads
instead of using async reads and having necko proxy the data over with ODA
calls. It will simplify the code quite a bit, and should speed it up as well, on
a high speed network. I have this working in my tree. Patch upcoming
Assignee | ||
Comment 1•21 years ago
|
||
this seems to work reasonably well, and gives a pretty good speedup on a LAN
connection
Assignee | ||
Comment 2•21 years ago
|
||
I need to remove some of the commented out code.I think I can get rid of the
m_pump stuff too. We might want to look into using the synchronous cache methods
as well.
Assignee | ||
Comment 3•21 years ago
|
||
this patch is ready for review. I've tried SSL, connecting to a server that
doesn't accept connections, etc, and everything seems OK. Performance seems
better too.
Assignee | ||
Updated•21 years ago
|
Attachment #131197 -
Attachment is obsolete: true
Assignee | ||
Comment 4•21 years ago
|
||
Comment on attachment 131257 [details] [diff] [review]
proposed fix
requesting reviews
Attachment #131257 -
Flags: superreview?(scott)
Attachment #131257 -
Flags: review?(darin)
Comment 5•21 years ago
|
||
Comment on attachment 131257 [details] [diff] [review]
proposed fix
You commented out these two lines:
+// if (m_chunkSize > m_maxChunkSize)
+// m_chunkSize = m_maxChunkSize;
are they save to outright remove or should we document why we think we can
comment them out?
Assignee | ||
Comment 6•21 years ago
|
||
ah, good one - I'll just remove them and add a comment.
Updated•21 years ago
|
Attachment #131257 -
Flags: superreview?(scott) → superreview+
Comment 7•21 years ago
|
||
Comment on attachment 131257 [details] [diff] [review]
proposed fix
this also looks good to me. looks like you also left GetThreadEventQueue
commented out in nsIImapProtocol, and that can probably be removed as well.
i'm going to give this patch a whirl ;)
Attachment #131257 -
Flags: review?(darin) → review+
Assignee | ||
Comment 8•21 years ago
|
||
great, thx, I've removed the commented out line from nsIImapProtocol.idl
Status: NEW → ASSIGNED
Comment 9•21 years ago
|
||
ship it! this thing feels sooo much faster!!
Assignee | ||
Comment 10•21 years ago
|
||
fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 11•21 years ago
|
||
From RFC 3501:
"Server data MAY be sent as a result of a client command, or MAY be sent
unilaterally by the server."
"A client MUST be prepared to accept any server response at all times. This
includes server data that was not requested."
This fix makes it impossible to implement features like the IDLE command (bug
141369) and what about autologout notifications from the server, these messages
won't be handled (if at all) by the client until the clients performs some kind
of action.
Assignee | ||
Comment 12•21 years ago
|
||
this fix doesn't really change the way the imap parsing code was working,
actually. I believe idle connections could occasionally poll and see if there's
data to read from the socket, and if so, read it.
Comment 13•21 years ago
|
||
I know the parsing was already done in a blocking way not using the async as
async so in that perspective this fix makes the code better. But in my opinion
all data from the server should be handled asynchronously (which would require a
probably too big a rewrite). Ah well, I guess I could live with polling although
it seems a bit unnessecary to me when you could be notified of data waiting to
be processed.
Comment 14•21 years ago
|
||
This caused regression bug 219185
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•