My script is taking 12 hours+ any suggestions?

Michael Peuser mpeuser at web.de
Sat Aug 30 09:12:06 CEST 2003


"Ideasman" <cpbarton at pacific.net.au> schrieb im Newsbeitrag
news:3f4ff9f8$0$23588$5a62ac22 at freenews.iinet.net.au...
> Hi I have a made a script that process normals for a flat shaded 3D
mesh's.
> It compares every vert with every other vert to look for verts that can
> share normals and It takes ages.
>
> I'm not asking anyone to rewrite the script- just have a look for any
> stupid errors that might be sucking up time.

As has been mentioned the source is not indented - there is no safer way to
make Python programs unusable ;-)

Looking through it you have *a lot* of evals in loops. Remove that! You
should convert your data immediately to a binary internal format while
reading from the file (first loop).

Kindly
Michael P






More information about the Python-list mailing list