On Fri, 2001-11-09 at 06:15, Amos Gouaux wrote: > What about all the stats looking for the script? Could that be a > problem? If so, could a db be used as a Sieve script index, like > the mailboxes.db? >
That would be a possible optimisation. Currently, the is one fopen call for every delivery. The number of calls would be determined by how many folders there are in the specification (number of "." + 1). Of course, if there was a hit sooner then this limit wouldn't be reached. Hard to say what affect this would have in practice - obviously, a "script.db" or an entry in "mailboxes.db" could cut down this lookup - there would be just a single "open" on the db file, followed by an open on the script. So you would still be doing two opens. So for many cases (user's folders) this lookup would be longer or as long as the case without the lookup. So it really depends on 1) how many folders have scripts and 2) the ration of deliver to deeply nest folders and none nested folders. Of course, it is only lmtpd that is affected - I think it would be better to do some analysis as it may be the case the the "script database" slows down the general case, and only improves performance on rarer cases.