[ https://issues.apache.org/jira/browse/JAMES-1440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14697379#comment-14697379 ]
Steve Brewin commented on JAMES-1440: ------------------------------------- In JPA, lazy fetching is only useful when the data to be fetched is infrequently referenced and is expensive to fetch. Generally it is cheaper to fetch all data eagerly as this can be achieved in a single visit to the database. All of the fields annotated with fetch=FetchType.LAZY in org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage are frequently referenced. These should be changed to fetch=FetchType.EAGER to avoid multiple visits to the database. I'll fix it! > Imap receive mail when there are many mails > -------------------------------------------- > > Key: JAMES-1440 > URL: https://issues.apache.org/jira/browse/JAMES-1440 > Project: James Server > Issue Type: Bug > Components: IMAPServer > Affects Versions: 3.0-beta4 > Environment: linux > Reporter: james > Labels: IMAP, mail > > hi,all > i have received mail from james that there are 30 thousand mails in > inbox,using javamail api with imap protocol. But it consumed 22s time to open > inbox mailbox,just open, not get messages.Then i changed the protocol to > pop3,it only cost 40ms. Why? Do imap not support good when lagre of mails? > > -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org