> Just a thought: Maybe it would make sense to sort them, > so you can use a simple binary search algorithm to retrieve > them, which should improve retrieval speed considerably > (it would scale much better with large lists). ... > Of course, all of that would be unnecessary if we had a > real SQL backend. ;-) (SCNR) Most (all?) databases are implemented with a hash table, aren't they? If you want better performance on retrieval, why not just use a hash table for the list? Insertion then remains quite simple too. Personally, I'm happy with the simple, unsorted list, since I think the delay on it is tiny compared with the DNS lookups that happen during the various stages of mail delivery. But if you really do want a more sophisticated data structure, I suspect a binary tree might be overkill. Cheers, - Joel
Message
Re: [milter-greylist] slow reloading of the database: the problem explained
2007-01-10 by Joel Reicher