Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To improve the load time for user events. Previously, a separate call to cur_hax (the previous axis information) was required to restore properties of user events.
What we tried:
Separate function call: axes creation within for-loop was slow, so we moved it to another function and called it from make_tmarker
Parallel programming: create multiple 'workers' to perform tasks simultaneously (create all the user events at once)
Final changes:
Add the 'hax' parameter to the text function call.
Edge cases tested:
Multiple overlapping events
Deleting multiple events and reloading audioGUI
Moving user events and expanding
Changing pre-emphasis or LPC order
Running profiler, we observe the following for make_tmarker:
For a trial with 3 user events, an ~87% decrease in runtime is observed.
Test 1:
Before: 1.086 seconds
After: 0.144 seconds
Test 2:
Before: 1.085 seconds
After: 0.148 seconds
etc.
For a trial with 20 user events, a ~95% decrease in runtime is observed.
Before: 4.947 seconds
After: 0.210 seconds
etc.