cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: FILE * => fd ?

From: Sterling Hughes <sterling_at_designmultimedia.com>
Date: Sat, 11 Aug 2001 03:49:25 -0400 (EDT)

On Fri, 10 Aug 2001, Andrew Francis wrote:

> On Fri, 10 Aug 2001, Sterling Hughes wrote:
>
> > On Fri, 10 Aug 2001, SM wrote:
> >
> > > At 22:04 09-08-2001 +0800, Andrew Francis wrote:
> > > >Win32 has it's own native file routines - CreateFile, WriteFile, etc.. the
> > > >stdio functions are just implemented by the standard C library you happen
> > > >to link against.
> > >
> > > It is more efficient to use CreateFile and WriteFile, etc under Win32.
> > >
> >
> > Yes, it definitely is.
> >
>
> My (unqualified) 2 cents - the major bottlenecks that are likely to exist
> are (a) disk I/O and (b) the network. The overhead introduced by using the
> wrappers in the C library are probably negligible.
>
> I don't think it's worth making the curl code more complex to use the
> native Win32 functions instead of the stdio stuff.
>
>

    Yeah -- its an extra level... Actually, I don't know how neglible
    it is -- I'd have to benchmark it (anyone have a win32 machine
    they'd care to lend me ;)

    But I could imagine it being signifigantly slower on larger files,
    as how many function calls do you think it is (which then translates
    into system calls) to read data from a 3gig file? I don't think
    using native calls on win32 with an option of mmap() (just use it if
    we have it, otherwise don't) in a separate file will be that hard,
    ie, have a seperate file which has the library function:

    Curl_ReadFile()

    Hell, I've got no problem implementing that -- if someone can do the
    win32 testing for me (I'll do the code no problem, I just don't have
    a w32 machine with compilers and all setup) and everyone agree's
    that its the best solution.

    -Sterling

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

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET