[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12358] branches/particles/source/blender: PointCache functions for physics solvers to store their data in, includes a pointCache modifier that can read and write animation point c

Emil Brink emil at obsession.se
Tue Oct 23 17:16:45 CEST 2007


> > +             for (mv=mvert, i=0; i<totvert; mv++, i++) {
> > +                     fwrite(&mv->co, sizeof(float), 3, fp);
> > +             }
>
> Just as a side note, I suspect this to be very inefficient, doing a system
> call per vertex. Better first make a buffer and then write that at once.

fwrite() is not necessarily equivalent with a system call. It's a C
standard library function, which buffers the writes. The library might
avoid doing any system calls until you either fflush() or fclose() the
file.

I'm not sure what buffer sizes typical implementations use, though.

Regards,

/Emil


More information about the Bf-committers mailing list