* On 2007.02.27, in <[EMAIL PROTECTED]>, * "Rocco Rutte" <[EMAIL PROTECTED]> wrote: > > ...because it has performance issues (obviously). I don't know if > attachement counting uses hcache properly, but if not: add for pre-1.6.
On hcache: Attachment counting uses the MIME tree parser, and caches the results in the HEADER structure during a mutt session. These result caches could be cached in hcache dbs, but the hcache would need to be expired when attachments/unattachments lines change since that would affect the counting algorithm, so we'd need some way of encoding the ruleset that generated the caches into the db. It could be done, though. MD5 hash of the sequence of attachment/unattachment rules processed would be the naive approach, I guess. On defaults & performance: Actually, even invoking the attachments rules won't affect performance by itself. Nothing is parsed or counted until a ~X or %X is encountered. Compiled-in defaults wouldn't affect performance, but they would add some complexity: since they'd need to be removable via unattachments, they cannot be static data. They'd have do be done with calls to parse_attach_list() and parse_unattach_list() instead (or mutt_parse_rc_line()). It was felt previously that since applying defaults would be essentially the same as parsing a set of default rules in Muttrc (just done by direct C calls instead), putting the defaults into Muttrc was a good way of setting defaults, and more easily maintained. But if (as Vincent says) upgrade paths make this a problem, then defaults could be installed as above. -- -D. [EMAIL PROTECTED] NSIT University of Chicago
