Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!chinacat!chip From: chip@chinacat.Unicom.COM (Chip Rosenthal) Newsgroups: comp.mail.elm Subject: Re: Aliases File Message-ID: <1663@chinacat.Unicom.COM> Date: 30 Oct 90 23:41:08 GMT References: <1990Oct30.190327.26105@ux1.cso.uiuc.edu> Organization: Unicom Systems Development, Austin, TX Lines: 36 In article <1990Oct30.190327.26105@ux1.cso.uiuc.edu> tim@uxa.cso.uiuc.edu) (/// Bereket Wilbury ) writes: >I'm a little in the dark as to why such a huge hash file needs to be created >for aliases, whereas ''mail'', the primitive force it is, only needs one >short ascii file. I think you are asking two questions here. First, why does Elm hash its aliases? Second, why is this so big? First - speed speed speed. In fact, many MTA's keep their aliases hashed. sendmail does. smail3.1 offers the option to do so. Is the speed worth it? I doubt it is for an MUA (e.g. Elm). Your mailer (the MTA) is getting beaten upon all the time to deliver messages, so hashing aliases is probably a win there. But Elm alias expansion happens infrequently, relatively speaking. Maybe folks who have humongous lists of aliases get a lot of benefit from the hashing. Given the tradeoff of simplicity versus saving 150msec when mailing a message, I'd take simplicity. Second - Elm uses a closed hashing scheme, and the alias file is a fixed size preallocated to hold the maximum number of aliases. Each alias slot requires NLEN+sizeof(long) bytes. On my system that works out to 48+4=52. For 251 user aliases, that means you need 251*52=13052 bytes, even if you have just a single alias. % ls -l .elm/aliases.hash -rw-r--r-- 1 chip unicom 13052 Aug 14 14:12 .elm/aliases.hash That's the price you have to pay given the Elm alias storage scheme. Is it the best way? Possibly not. On the other hand, in the overall cosmic scheme of things, once you load SysV and X11 and Motif and USENET and all the other crap, 12K files get lost in the noise. -- Chip Rosenthal Unicom Systems Development, 512-482-8260 Our motto is: We never say, "But it works with DOS."