summaryrefslogtreecommitdiff
path: root/usr.bin/vacation/vacation.c
diff options
context:
space:
mode:
authorDaniel Hartmeier <dhartmei@cvs.openbsd.org>2002-12-19 12:46:07 +0000
committerDaniel Hartmeier <dhartmei@cvs.openbsd.org>2002-12-19 12:46:07 +0000
commitef790bfeefa456354c8b2646ff4757f1c9770125 (patch)
treeac10354159988079c2d2760f790193580c2308d6 /usr.bin/vacation/vacation.c
parentdd3836c9d3ed853d174d02cfa3cea11d6b99bfec (diff)
Replace skip step calculation so it scales O(n) instead of O(n*n).
Loading large rulesets consists of two phases. First, the rules are parsed and added, one by one, to the inactive ruleset. The machine remains responsive during that phase. Then, the new ruleset is activated, and the skip steps are calculated. The machine locks up during that phase. This second phase is greatly reduced with the new algorithm. With the old one, calculation could take 30s for 12k rules, with the new one, 100k rules take less than 1s. For small rulesets (less than 1000 rules), the gain is insignificant. ok mcbride@, henning@
Diffstat (limited to 'usr.bin/vacation/vacation.c')
0 files changed, 0 insertions, 0 deletions