From: Cameron L. <cl...@st...> - 2001-11-12 22:56:51
|
of large items: all the interesting action is in the "while {$moreP} {..." loop of mime::parsepart, that is, the second one, which parses bodies. For the purposes of this discussion, any benefit to splitting mime::parsepart in various ways mentioned already is essentially irrelevant; all that matters is to improve the second loop, in the case where $fileP is zero. I'm currently using set list [split $string \n] set i 0 while {!moreP} { ... set line [lindex $list $i] incr i ... } Eventually I'll probably use a more time-efficient coding. The multiple orders of magnitude this one gains me are enough for now, and I feel safer with a loop that preserves most of the existing source. If someone else wants to pursue this, note that the value of $string coming out of this loop is immaterial; the only substantive use made of $string is to compute $line (except for one trivial excepti- on-handler). |