Possible memory leak?
fredrik at pythonware.com
Tue Jan 24 17:09:02 EST 2006
> I have a function in a program that works something like this.
> def load_pic_data(width,heigth,inpdat, filt=TRUE):
> for y in range(0,heigth):
> for x in range(0,width):
> if(vfilter.get() and d_filter and filt):
> The purpose of this part of a program is to take a 14 bit numerical
> representation and convert it to an 8 bit representation. This will
> later be displayed as an image. However, I've noticed the following
> about this code. I was noticing when I took a small picture, it went
> really fast, but a larger picture took forever to run through. I added
> a print statement to the y portion of the code to see where it was
> getting hung up. I noticed that it appears to be running slower as time
> goes on.
hint: what does
do, and how often is it executed ?
More information about the Python-list