Tcl Library Source Code

View Ticket
Bounty program for improvements to Tcl and certain Tcl packages.
Ticket UUID: 1385688
Title: pop3 - New retrieval method + minor performance improvement
Type: RFE Version: None
Submitter: nobody Created on: 2005-12-20 00:28:17
Subsystem: pop3 Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Open Last Modified: 2008-03-23 13:42:42
Resolution: Closed By:
    Closed on:
Attached is the entire pop3.tcl with the proposed 
changes.  I took the liberty of bumping up the 
version from 1.6.3 to 1.7.  Note that this code has 
actually been in operation for almost two years.

First a minor performance improvement in RetrFast - 
don't spend time splitting potentially large message 
if not doing any debug logging.

Second is a new retrieval method - tofile.
Since POP3 messages can be very large, with 
attachments that may never need to be processed in 
tcl, to minimize memory usage, it may be best to 
write the retrieved message to a temp file and return 
the temp filename instead of the entire message.

# Alex Hisen ([email protected]) 2005-12-18:
# In order to provide support for the new tofile 
retrieval method
# we need a way to generate temporary file 
# We first try to use an AOLserver command if 
# If not we try to see if our version of Tcl supports
# the file tempfile subcommand (see TIP #210:
# )
# Finally we fallback to the tcllib fileutil package.
# Note that our package require fileutil is caught, 
so even
# if you don't have any of the three methods, this 
# will work fine as long as you don't use tofile 
# The Tempfile proc we create in our namespace 
# the way TIP #210 prescribes - it opens the file for 
# returns the open file channel, and sets the 
supplied variable
# to the full path and name of the created temporary 
User Comments: nobody added on 2005-12-20 07:28:18:
File Added - 160450: pop3.tcl