-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about memory usage #314
Comments
Hi @BDumphart ! Unlike BTK, there is no "connexion" to a backend in c3d. The output of the file is the whole story. This means that overriding the output variable should be enough UNLESS there is a memory leak in the code. If it is the case please let me know! |
Hi @pariterre! Thank you for the quick response. Cheers, Bernhard |
You should monitor the RAM usage. If you are on Windows, this can be done from the task manager. From UNIX system, you can use from ezc3d import c3d
for file in files:
c = c3d(file)
# Do Something and NOT: from ezc3d import c3d
c = []
for file in files:
c.append(c3d(file))
# Do Something if the memory usage increase overtime in a linear fashion, then there is a memory leak. If not, then it means it crashes for another reason. Maybe one of the file is corrupted or something |
The memory increases in a linear fashion - and also, it got further then the last time - so the file is not corrupt. I also have a smaller sample at hand with only 20 participants and I ran the code twice on my laptop in the same python console. This added up to 70% memory usage from 55%. Afterwards I did globals().clear() - all variables were gone memory usage stayed pretty much the same up to 68% (also did a gc.collect - nothing changed). What do you suggest? |
Oh! That definitely looks like a memory leak. There is nothing you can do for now. I'll have to have a look a the source code to find the bug and fix it. I'll keep you posted |
Yeah, we are doing that right now - thank you for the information :) |
That's allright, I could replicate the issue on my side, it is in the force platform module. If you do not need it you can add |
That´s great that you found it so fast! Unfortunately, we also need the force plate data - splitting works fine just now, so it is ok! |
Fixed in #315 |
I tried it, works fine for me now - thank you for fixing and creating this nice tool! :) Cheers, Bernhard |
Hi again!
This is more of a general question because i don't know where else something could be wrong.
I need to open .c3d files of over 2k patients, each with ~5 .c3d files in a loop. And i run into a RAM problem.. i had the same issue when working with the btk tool - there i just had to close the connection to the .c3d file in thr end and the RAM was fine, but I can't find a close function for ezc3d - am I missing something here or should ezc3d close the file automatically? I am using the python version, if this changes anything.
Thanks,
Bernhard
The text was updated successfully, but these errors were encountered: