Re: Another problem to look at.

[email protected] Mon, 23 Apr 2012 09:07:50 -0400
Newsgroups gmane.mail.exmh.user
Message-ID <[email protected]>
On Sun, 22 Apr 2012 23:46:36 -0600, [email protected] said:

> If the number of articles in a give directory get to 32k (or mabe 65k)
> the initial startup of EXMH just stalls when it gets to this group.
> And its easy to get these large number of articles in groups like gnu.
> Im sure it is just the width of some field somewhere, but Ive never
> been able to find it.

If it's what I think it is...

The problem is that if the .xmhcache file is out of date for that directory,
exmh has to rebuild it by running 'scan'.  Adding "*scanSize: 1000"  will
make it do a 'scan last:1000'  (for a suitable value of 1000).  There's a tradeoff
here - things go a lot faster but the scan pane only lists the last N items
and you need to hit 're-scan folder' to see more.

The crazy part is that I once benched this out, and here's the offender in scan.cl:

proc ScanFolder does this:

            set input  [open "|$mhProfile(scan-proc) [list +$folder] \
                    last:$ftoc(scanSize) -width $ftoc(scanWidth) -noheader"]
...
        ScanAddLines [read $input]

proc ScanAddLines { text } {
    global exwin
    $exwin(ftext) insert end $text
}

and that ends up being incredibly expensive if $text is large - it appears that
'insert end' CPU usage is O(n**2) or worse on size of $text. It might be
interesting to see if there's a speedup by converting it from one call to a
while loop that does one line at a time.  Or did we try that at one time and
those results were even worse?

_______________________________________________
Exmh-users mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/exmh-users
signature.asc (application/pgp-signature, 865 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Exmh version 2.5 07/13/2001

iQIVAwUBT5VUJgdmEQWDXROgAQLHgw/+IwDTofXb/YYyrsAnRdOxxnZopw45U1Pl
+WrpM673JcGRJJ129lSsdI7wdCyJnp8BPFehJY3WCnNISSBw06w8DSRDZQD5vrBN
IRvYaWKnbBow3PWFXPjOk/XujhzLvpJlwQvFj3DaFHam64mSqRrtQpxsD60ZjSor
BXYuCQf/5dbCfice1LrNky+E7L3/POWMd+EiYjvLhe+MbmcUY7kUUe01033ynAfa
IA7m48FFOmD1+98XgM2TPPnKRsFQ4oQHshx7TbzaoqgxVV0n2h8FsvQ/8j70+tws
tLsQNSwis3YcOsWVGoZae/m8n2mDha2oT/mQMMpXmGPPZAELxGtnQCvF0epHw4FX
NM33plc43zyEb14eWRa42A7Du0IuUDix1kz+tnnM30m2jdU9feyvfoy5DVRU6tXt
Bb159PfDb/qBwD7Mc7lYqjNt/N8AD9lC5fX9TCG1Xij5Noa6T5EtV1nXNuRp3Ke5
RimOsdzMIXWQgcPl6L7aznI0kSD869wcM6VvQguBYybc6KnHduT1DhAR42bYhBLH
znW8q07BMQ0RxiU2hILMEgi1sMpEfMVbox3UvLOP+QHO/R6K7XkcR15vbVZR/Fzi
BPRamun6i/uZM4A0Ck57R4LOpVG/LlA75uQ0GObuIEmyqvb2kHYay08owEzxSMZL
5bZJSYCvPi4=
=8KsW
-----END PGP SIGNATURE-----