reading files in small chunks?

Rajesh Sathyamoorthy rajesh1986 at gmail.com
Fri Apr 14 17:01:37 EDT 2006


Hi,

What chunk sizes do you normally use in your code?

Thank You.
On 4/14/06, Amit Khemka <khemkaamit at gmail.com> wrote:
>
> On 4/14/06, Rajesh Sathyamoorthy <rajesh1986 at gmail.com> wrote:
> > Hi,
> >
> > I wanted to know why it is more efficient to read a file in smaller
> chunks (
> > using file() or open() )? If this is not done, will this lead to errors
> in
> > the data read or just results in slower performance?
> >
> >  Thank You.
>
> It has basically to do with disk seeks and cache+memory utilization.
> and you can look around for the same for details on any of your fav
> search engine.
>
> cheers,
> amit.
> >
> > --
> > http://mail.python.org/mailman/listinfo/python-list
> >
> >
>
>
> --
> ----
> Amit Khemka -- onyomo.com
> Home Page: www.cse.iitd.ernet.in/~csd00377
> Endless the world's turn, endless the sun's Spinning, Endless the quest;
> I turn again, back to my own beginning, And here, find rest.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060415/4f6b9fdb/attachment.html>


More information about the Python-list mailing list