geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick McGuire (JIRA)" <j...@apache.org>
Subject [jira] Commented: (GERONIMO-4584) Opening an IMAP folder with *logs* of emails is very expensive in terms of memory and cpu
Date Fri, 03 Apr 2009 12:10:13 GMT

    [ https://issues.apache.org/jira/browse/GERONIMO-4584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695355#action_12695355
] 

Rick McGuire commented on GERONIMO-4584:
----------------------------------------

Guillaume, I committed a fix attempt at this in revision 761642.  Could you try this out to
see if it fixes your problem?

Rick

> Opening an IMAP folder with *logs* of emails is very expensive in terms of memory and
cpu
> -----------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-4584
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4584
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: mail
>            Reporter: Guillaume Nodet
>            Assignee: Rick McGuire
>            Priority: Minor
>
> {code}
>                 // this is a real pain, but because we need to track updates 
>                 // to message sequence numbers while the folder is open, the 
>                 // messages list needs to be populated with Message objects 
>                 // to keep track of things.  The IMAPMessage objects will not 
>                 // retrieve information from the server until required, so they're
>                 // relatively lightweight at this point. 
>                 populateMessageCache(); 
> {code}
> {code}
>     /**
>      * Populate the message cache with dummy messages, ensuring we're filled 
>      * up to the server-reported number of messages. 
>      * 
>      * @exception MessagingException
>      */
>     protected void populateMessageCache() {
>         // spin through the server-reported number of messages and add a dummy one to

>         // the cache.  The message number is assigned from the id counter, the 
>         // sequence number is the cache position + 1. 
>         for (int i = messages.size(); i < maxSequenceNumber; i++) {
>             messages.add(new IMAPMessage(this, ((IMAPStore)store), nextMessageID++, i+1));
 
>         }
>     }
> {code}
> The above code comes from http://svn.apache.org/repos/asf/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/store/imap/IMAPFolder.java.
> When trying to open my gmail account using IMAP, this takes a long time and an enormous
amount of memory (500 Mb) just to open the folder.
> It might be a good idea to revisit this code if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message