Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!amdahl!rtech!gonzo!daveb From: daveb@gonzo.UUCP (Dave Brower) Newsgroups: comp.mail.uucp Subject: Re: Making /usr/lib/uucp/paths a _binary_ database Summary: What would you gain? Keywords: pathalias UUCP smail Message-ID: <490@gonzo.UUCP> Date: 3 Jan 89 16:52:02 GMT References: <486@fallst.UUCP> Reply-To: daveb@gonzo.UUCP (Dave Brower) Organization: Gonzo Media Group Lines: 26 In article <486@fallst.UUCP> tkevans@fallst.UUCP (Tim Evans) writes: >I'm not very proficient at C, but it seems that since 'paths' is >essentially a two-field set of records it ought not be terribly >hard to make 'pathalias' generate a binary database file. > The first question is "what you would gain?" The only obvious overhead in the existing format are the \n separator between records and a one character field separator. A binary format that was significantly smaller would also be much more cpu and disk i/o intensive to access. The existing format, using "look" usually takes < 10 disk reads to locate a path or give up. Straight compress(1)-ion would be incredcibly slow, since you'd need to uncompress 1/2 the file on average to find a path. Other schemes are possible, but most seem to me to bne performance killers too. -dB -- If life was like the movies, the music would match the picture. {sun,mtxinu,hoptoad}!rtech!gonzo!daveb daveb@gonzo.uucp