fkoyer commented on PR #31: URL: https://github.com/apache/spamassassin/pull/31#issuecomment-5037820784
I like the idea of doing things lazily to improve performance. I also like the idea of moving towards making Node.pm type-agnostic. In other words, I was thinking about moving all HTML handling into the HTML handler at some point in the near future. Currently that would mean moving lines 814–892 of Node::rendered() into Handler::HTML. This change makes that slightly more complicated because both visible_rendered and invisible_rendered need to know about html_obj. Your change works because, right now, text/html is the only type that emits invisible text. I like to keep things pure in case someday there's another part type that emits invisible text (I don't know what that would be). But I don't dispute that this change has a slight performance advantage, if there are no invisible text rules. One more thing to note, `bayes_token_sources` defaults to "header visible invisible uri" so if Bayes is enabled, both visible_rendered() and invisible_rendered() fire on every HTML part and both deferred passes run anyway. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
