Petite Abeille <petite.abeille@...> writes: > > > On May 16, 2013, at 9:56 AM, Alexey Melnichuk <mimir@...> wrote: > > > lua-pop3 v0.1.3 > > Nice. Thanks for sharing. > > One question though… > > The LIST [1] and UIDL [2] implementation seems to build a table of all the returned values, if I read the code > right. This might not fly for larger mailboxes though. > > Consider: > > STAT > +OK 632827 5248260641 > > Building a table to temporary hold these 632,827 messages data points is a bit of an overhead, no? > > Have you perhaps consider turning these methods into proper iterators? > For what this iterator? If we use something like coroutine (yeild for each new element from LIST) we can not do anything with pop3 server during iteration. (we can not retrive or delete message). We only can store this ids somewhere. For now you can do for no = 1, mbox:stat() do local id = mbox:uidl(no) local msg = mbox:message(no) ... end But you should be careful with DELE. May be it has sense for UIDL. We can sync local storage (but if i correct understand severel messages can have same id and we still need test message themself).
------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d _______________________________________________ Luarocks-developers mailing list Luarocks-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/luarocks-developers