#1
|
|||
|
|||
massive memory problems
We use nothing but python and vizard but run into serious memory issues.
what we do is basically creating some (10k-20k primitives) objects every trial...do something. get the participants reponse and then .remove() the corresponding objects. it turns out vizard (winviz) is eating lots and lots of memory. there has to be some leak, we are pretty sure that we dont hold any references to the objects after a trial. we tried viz.clearcache()...that helps a little but not really. some observations from the task manager: (calling viz.clearcache() after each trial) vizard eats memory up to the point where the process tab shows about 1gig. the system performance tab shows about 3gb of usage (after about 20 trials or so). the computer then starts to heavily page. ..then the usage in the process tab shrinks to like 20mb again (winviz being still the biggest memory user). however in the system performance tab, the memory seems to be still taken. the computer keeps paging a lot. performance while loading new objects is horribly slow. while pressing F4 to see the render characteristics, everything seems fine. primitive / drawables are reasonable for each trial. |
#2
|
|||
|
|||
A few questions to help debug:
|
#3
|
|||
|
|||
i have sent you an email with the problematic scripts. thanks in advance |
#4
|
|||
|
|||
I did not receive the email. Can you try sending it again or using the upload form?
|
#5
|
|||
|
|||
mhm. the bounce message arrived here in the middle of the night so i missed it until now. sorry. i have resent it via the upload form
|
#6
|
|||
|
|||
Unfortunately, I have the same problem as well, my CPU Usage was 100% when I compile my code.
|
#7
|
|||
|
|||
Moh200jo: uhm. no. you must've misread this entire thread. it's about memory usage and massive paging. -- that got nothing to do with cpu bottlenecks, at all
|
#8
|
|||
|
|||
I am also talking here about the performance of Vizard when I run my code. When I press f4 everything looks good. But the VR scenario is really very slow (i.e. images jump during the scenario uploading )
|
#9
|
|||
|
|||
Quote:
I ran your script and noticed increasing memory usage as well. I believe the problem is that the script is adding textures but never deleting them. It looks like you are adding a new texture for each model that is loaded, so the number of textures will quickly build up. Your script is already removing the node objects, so you just need to modify it to remove the texture objects as well. This should drastically reduce the memory usage of your script. |
#10
|
|||
|
|||
so vizard is not deleting the textures?
i mean...there is no object where the texture is applied, nor is there any python reference to it. i couldnt possibly use the texture again? what am i missing? -- i'll check tomorrow if that solves the problems. |
#11
|
|||
|
|||
If your script does not require a handle to the texture after applying it to the model, then you can immediately remove it after using it. Example:
Code:
tex = viz.addTexture(...) model.texture(tex) tex.remove() |
#12
|
|||
|
|||
if it is that problem fine. i'll have to check tomorrow again at the office workstation.
just wondering why. i mean why is that something that can "leak". i mean in vizard you use python for all your scripting. i always thought that was one of the advantages of python (or higher level scripting languages for that matter) that you dont have to care about memory management. |
#13
|
|||
|
|||
thanks. that fixed it -- on the same note, where in the manual should i have read about that caveat?
btw, a much better option i found to get ridd of this and at the same time get a better performance is: useCache=True in the .addTexture call. (not doing the remove() nor the viz.clearcache() of course) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
vizard memory error | durf | Vizard | 2 | 08-05-2009 08:28 AM |
Problems loading WRL file | DrunkenBrit | Vizard | 2 | 01-29-2009 01:58 AM |
Linking problems with Live Character | Frank Verberne | Vizard | 5 | 06-04-2008 12:42 PM |
2 problems with our HMD | Vbents | Precision Position Tracker (PPT) | 1 | 07-26-2006 08:55 PM |
Problems with lighting in 2.0 | murm | Vizard | 6 | 04-21-2004 10:59 AM |