Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 13567 invoked by uid 6000); 12 Oct 1999 11:08:04 -0000 Received: (qmail 13549 invoked from network); 12 Oct 1999 11:08:03 -0000 Received: from kurgan.lyra.org (root@216.98.238.198) by taz.hyperreal.org with SMTP; 12 Oct 1999 11:08:03 -0000 Received: from kurgan.lyra.org (IDENT:gstein@localhost [127.0.0.1]) by kurgan.lyra.org (8.9.2/8.9.2) with SMTP id EAA30973 for ; Tue, 12 Oct 1999 04:07:01 -0700 (PDT) Message-ID: <38031655.57E6524F@lyra.org> Date: Tue, 12 Oct 1999 04:07:01 -0700 From: Greg Stein X-Mailer: Mozilla 3.01 (X11; I; Linux 2.0.28 i586) MIME-Version: 1.0 To: new-httpd@apache.org Subject: Re: Question. fopen() in ap_pfopen() background ? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org Ryan Bloom wrote: > > > > This is not true. APR uses both file descriptors as well as FILE *'s, > > > depending on what the situation calls for. > > > > it would be nice if we could avoid ever using FILE *... a project for > > someone. > > It wouldn't be hard, we would just need to put our own buffering into APR. > For the sake of getting APR up and working and stable, I decided to use > what was available for the first version of APR. I would think that in > APR 1.1, we could probably get buffering into APR itself, and remove the > need for FILE *'s completely. I agree, it does make somethings ugly to > have those FILE *'s in there. I do understand that FILE* can avoid a kernel context switch by buffering in libc, but is there really a big perf gain? Don't most modern operating systems provide plenty of builtin buffering? i.e. why write it ourselves when the OS will usually do fine? Hrm... what I'm trying to say is: can anybody characterize the actual different between an fd and a FILE* on a good OS? Cheers, -g p.s. obviously, I've never run this perf test... if there really is a big difference, then I'll shut up now :-) -- Greg Stein, http://www.lyra.org/