Tk Library Source Code

View Ticket
Login
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: Closed Last Modified: 2013-07-04 17:25:36
Resolution: Not Applicable Here Closed By:
    Closed on:
Description:
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 
paths/names.
# We first try to use an AOLserver command if 
available.
# If not we try to see if our version of Tcl supports
# the file tempfile subcommand (see TIP #210:
# http://www.tcl.tk/cgi-bin/tct/tip/210.html )
# 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 
package
# will work fine as long as you don't use tofile 
retrieval.
#
# The Tempfile proc we create in our namespace 
operates
# the way TIP #210 prescribes - it opens the file for 
write,
# returns the open file channel, and sets the 
supplied variable
# to the full path and name of the created temporary 
file.
User Comments: nobody added on 2005-12-20 07:28:18:

File Added - 160450: pop3.tcl

Attachments: