|
From: Bruce S. <bas...@nc...> - 2010-10-29 17:33:18
|
Following your suggestion, I tried the following in VPython 5.4 on
Python 2.7 in Windows 7
from visual import *
N = 1000000
pts = ones(N*3).reshape(N,3)
while True:
c = curve(pos=pts)
c.visible = False
del c
Is this something like what you did? I watch the Windows Task Manager
and cannot see any change in the memory usage.
Bruce Sherwood
On Fri, Oct 29, 2010 at 8:38 AM, Beracah Yankama <be...@mi...> wrote:
> hah! now i'm not the only one who noticed this! i was graphing a lot
> of data too with lots of curves (a graph cluster growing to thousands of
> nodes and edges, which are dynamically positioned), but after like 200
> edges and being repositioned, an out of memory error gets thrown. I had
> tracked it down to vpython.
>
> I had written (in case it is helpful to you):
> """
> I made a test script, that only
> creates objects in the window, then deletes them over and over, and I
> found the long-term memory use/growth to be related linearly to the .pos
> attribute. For instance, a curve with 20 points leads to unreleased
> memory that grows 10x as fast as curves with only 2 points. Similarly,
> if I assign the .pos attribute as a numpy ndarray directly, the leak
> grows twice as fast as if assign the individual xyz values.
> """
>
> B
>
|