https://issues.apache.org/jira/browse/JAMES-734 discusses the general
design of the API

one major issue for IMAP ATM is that when FETCHing a large quantity of
data, all that data has to be loaded into memory and then the full
result created in a StringBuffer before the output begins. this uses a
lot of memory.

there are different ways to approach this issue. IMHO using arrays,
lists or iterators is as much a matter of style than substance.

one approach would be to use result objects which are lazily
populated. this would be reasonably easy for Torque. this would also
mean either adding a close() operation or making the content objects
read-once allowing the result to recycle the memory.

part of the solution must be to move to a design that allows each line
to be written once out when it has been composed. the interface
changes i've made to the new IMAP implementation are directed at this.

opinions?

perferences?

- robert

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to