>>>Robert Elz said:
>     Date:        Wed, 28 Aug 2002 09:22:34 -0500
>     From:        Chris Garrigues <cwg-dated-1030976555.34ad5b@DeepEddy.Co
m>
>     Message-ID:  <1030544555.28815.TMDA@deepeddy.vircio.com>
>
>
>   | so I'll probably poke around at the sequences performance issues,
>
> Well, there's this wonderful piece of code in MhSeqExpand ...
>
>     # Hack to weed out sequence numbers for messages that don't exist
>     foreach m $rseq {
>         if ![file exists $mhProfile(path)/$folder/$m] {
>             Exmh_Debug $mhProfile(path)/$folder/$m not found
>             set ix [lsearch $seq $m]
>             set seq [lreplace $seq $ix $ix]
>         } else {
>             # Real hack
At least I'm up-front about my hacks :-)
>             break
>         }
>     }
>
> which is going to run slow if a sequence happens to start with a bunch
> of messages that don't exist.   I'm not sure why it is important that the
> first message in the sequence returned exists, but not necessarily any
> of the others, but I'm sure glad it is, as MhSeqExpand gets called lots,
> and I don't know if I could cope if it were checking every file in the
> sequences it is looking at, all the time...
That was my thinking.  My recollection about the first message being valid
is that the ftoc code wants to find that message to start its highlighting,
for example, or you are selecting a message to display.
> It may help to keep a list of the valid message numbers for the current
> folder (though that would then need to be verified against changes to the
> directory).   Does tcl have a directory read function?   I assume so...
glob -nocomplain $mhProfile(path)/$folder *
will return an unsorted list of the directory's contents.
But the thought of keeping an in memory list of valid messages is not fun.
Exmh already maintains in-core lists of messages in sequences, which is
already pretty tricky
> Mh_Sequence also goes and rereads the files (.mh_sequences and the
> context file) but I'm not sure how frequently that one is called.
In some places I maintain caches of files by checking their modify time,
but the sequence files are soo small that by the time you stat them to
check their date stamp, you could just read them again.  Also, now that
we checkpoint message state on every message view, that file will change
every time.  In the old days exmh used to cache a bunch of state about
the folder.
--
Brent Welch
Software Architect, Panasas Inc
Pioneering the World's Most Scalable and Agile Storage Network
www.panasas.com
welch@panasas.com
_______________________________________________
Exmh-workers mailing list
Exmh-workers@redhat.com
https://listman.redhat.com/mailman/listinfo/exmh-workers