-
Notifications
You must be signed in to change notification settings - Fork 310
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
C3DFileAdapter: very slow file reading to Tables #1698
Comments
Need to add a benchmark to the test case. Profile each step to see where issue is coming from. |
@aseth1 will profile |
I did some profiling and it seems that the issue is the resizing that |
Here's how I got the number of rows and column: int marker_num_frames = marker_pts->GetFrontItem()->GetFrameNumber();
int marker_num_columns = marker_pts->GetItemNumber();
marker_table.updMatrix().resize(marker_num_frames, marker_num_columns); |
Thanks @chrisdembia for checking and suggesting a fix. I can confirm your findings in VS2015 profiler: |
Ah; it seems like your profiler was more helpful. Let me know if you want to chat more. |
PR in review |
…ding_1698 Fix slow C3DFileAdpaterReading issue #1698
Reading a c3d file's data to a Table using the C3DFileAdapter is currently very slow. I compared loading a c3d file (1 minute of walking data) using @jimmyDunne's
btk_loadc3d()
MATLAB script to the C3DFileAdapter and got the following results after 3 runs (Windows 7, 64-bit, i5 2.50 GHz):btk in MATLAB: 0.39 +/- 0.07 seconds
C3DFileAdapter: 671.96 +/- 20.08 seconds
If you'd like to recreate the test, I can send you the file I used.
The text was updated successfully, but these errors were encountered: