[Dcphp-dev] Fastest way to read a 100mb+ file?

soazine at erols.com soazine at erols.com
Fri Jul 13 04:18:47 EDT 2007


I don't need to read the whole file, just read the file size of it and its
mime type, that's all.  How would I use fseek() + ftell() in this case?

SWIG?

Original Message:
-----------------
From: M Yilmaz mehmety at gmail.com
Date: Thu, 12 Jul 2007 21:09:51 -0400
To: soazine at erols.com, dcphp-dev at calypso.tux.net, dcphp-dev at calypso.tux.org
Subject: Re: [Dcphp-dev] Fastest way to read a 100mb+ file?


What do you need to do with it? Do you need to read the whole file?
perhaps you could use fseek + ftell to try figure it out?  I don't know if
that would be faster.

Another alternative might be to use SWIG and compile something which
probably would be similar to what the Zend folks already did, with C and
their engine.

Let me know if that helps.

On 7/12/07, soazine at erols.com <soazine at erols.com> wrote:
>
> I am trying to find a fast way of getting file size from a very large
> (100mb+) file, used both filesize() and imgstatarray() but both are
> extremely slow, 30 seconds/file average.  Is there a faster way?
>
> Thanx
> Phil
>
> --------------------------------------------------------------------
> mail2web - Check your email from the web at
> http://link.mail2web.com/mail2web
>
>
> _______________________________________________
> Dcphp-dev mailing list
> Dcphp-dev at calypso.tux.org
> http://calypso.tux.org/cgi-bin/mailman/listinfo/dcphp-dev
>



-- 
Mehmet Yilmaz
Chief Software Engineer
Government Services Integrated Process Team


--------------------------------------------------------------------
mail2web.com - Microsoft® Exchange solutions from a leading provider -
http://link.mail2web.com/Business/Exchange




More information about the Dcphp-dev mailing list