https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7987
--- Comment #28 from Henrik Krohns <apa...@hege.li> --- A quick cleanup to tidy things: - Use rule_ready() everywhere instead of direct tests_already_hit modify - Simple tracking of meta dependency hits, run do_meta_tests only when needed - Do not run do_meta_tests on last priority, as finish_meta_tests will run anyway Committed revision 1901060. It already reduces unnecessary do_meta_tests calls a lot. Before: do_meta_tests -1000 ready 2 do_meta_tests -950 ready 0 do_meta_tests -900 ready 0 do_meta_tests -100 ready 5 do_meta_tests -90 ready 0 do_meta_tests 0 ready 1234 do_meta_tests 500 ready 0 After: do_meta_tests -950 ready 2 do_meta_tests -100 ready 5 do_meta_tests 0 ready 1234 Though in the grand total runtimes, it makes very little difference. It's hard to optimize things, as most metas will end up ready at priority 0 anyway. Will look if there's further to improve, but I'm quite sceptical about the --$conf->{meta_dep_count} stuff, as it's really hard to guarantee that someone doesn't call rule_ready() multiple times, obviously then the counts will end up wrong and metas could be run prematurely. It's possible to track readiness perfectly with a hash from which you delete dependencies as they occur. I already tried something like that, but it gets so complex that it actually increases runtimes. -- You are receiving this mail because: You are the assignee for the bug.