Re: Patches
On 2006-04-28 18:49:50 +0000, Rocco Rutte wrote:
> IMHO the problem is that mutt_free_body() will clear out
> hdr->content->parts so that next time the
> mutt_count_body_parts() function in the if-part isn't called
> because hdr->content->parts was cleared and thus caching
> doesn't have any affect.
I'm not sure who has come up with the code in and around
mutt_count_body_parts, but the technical term for this
particular bit of code is "braindead."
- The expensive MIME parsing happens in code that doesn't even
look at whether or not there is an existing, valid count.
(mutt_count_body_parts looks at that information, but the
code that invokes it doesn't, and does the parsing step just
for good measure?!?)
- mutt_count_body_parts is invoked twice, because it also runs
from mutt_parse_mime_message().
Oh well. Now trying to hack this into some shape that remotely
resembles decent code.
--
Thomas Roessler · Personal soap box at <http://log.does-not-exist.org/>.