cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: FILE * => fd ?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 8 Aug 2001 13:09:05 +0200 (MET DST)

On Wed, 8 Aug 2001, Sterling Hughes wrote:

> This sounds like a good idea -- it should also give us a reasonable
> performance increase over the stdio layer. One thing I am concerned
> about is Win32 performance, but as I don't develop on that platform :)

Why would we get worse performance in windows with this suggested change?

> Also, as a small implementation note, file descriptors should also be
> wrapped in a structure, something like a curl_fd_t, just for portability
> reasons.

Why (or perhaps how)? Doesn't that just make things more complicated? I mean,
today you just fopen() and pass in the returned pointer, why would open() and
pass in the returned file descriptor need a different treatment?

> Ps: Have you ever considered perhaps converting cURL over to APR, it
> might help with issues such as this one...

I have. (APR => Apache Portable Runtime for the uninitiated)

The Subversion guys uses it exensively (I sometimes pretend I contribute to
that project), and I know there's been talk about moving the neon library
(HTTP + webdav) over to APR.

But, moving to APR for such a tiny reason seems like a huge overkill to me.
APR is still not a standard library on machines, and it contains about 2.5
times more source code than libcurl. It also solves issues and contains many
functions that libcurl certainly doesn't need. I don't even think they have
APR working in that many more platforms than we have libcurl working on.

Or are there some good reasons I haven't taken into account?

-- 
     Daniel Stenberg -- curl dude -- http://curl.haxx.se/
_______________________________________________
Curl-library mailing list
http://curl.haxx.se/libcurl/
Received on 2001-08-08