diff options
author | Sergey Sharybin <sergey@blender.org> | 2020-12-03 16:32:57 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2020-12-03 16:51:11 +0300 |
commit | 5d1308262218db60e22088bd7f16587cf28148e0 (patch) | |
tree | 4d3f11f271ea61137ca7e60c4a616419bc93a3ad /intern | |
parent | a6c4e39876d8a0765290312f6d8c0175274114cd (diff) |
Tracking: Improve multithreading of tracking many markers
This change solves a bottleneck which was caused by attempt to cache
postprocessed search areas used for tracking. It was a single cache
used by all threads, which required to have some synchronization
mechanism. This synchronization turned out to be making all threads
to idle while one thread is accessing the cache. The access was not
cheap, so the multi-threading did not provide expected speedup.
Current solution is to remove the cache of search areas. This avoids
any threading synchronization overhead because there is no need for
it anymore. The downside is that for certain configurations tracking
became slower when comparing to master branch. There is no expected
slowdown compared to 2.91 release.
The slowdown is mainly experienced when using big search area and
keyframe matching strategy. Other cases should still be within a
ballpark of performance of single-threaded code prior to this change.
The reason why is it so is because while this change makes it so the
image accessors needs to process images multiple times the complexity
of this process is almost the same as all the overhead for the cache
lookup and maintenance.
Here are Some numbers gained on different configurations.
CPU: Intel Xeom CPU E5-2699 v4
OS: Linux
Footage: Old_Factory MVI_4005.mov from the first part of Track Match
Blend training which can be found on the Blender Cloud.
Tracking 443 markers across 250 frames. The unit is seconds.
File: F9433209
2.91: 401.520874
before: 358.650055
after: 14.966302
Tracking single marker across 250 frames. The unit is seconds.
File: F9433211
2.91 before after
Big keyframe 1.307203 1.005324 1.227300
Big previous frame 1.144055 0.881139 0.944044
Small keyframe 0.434015 0.197760 0.224982
Small previous frame 0.463207 0.218058 0.234172
All at once 2.338268 1.481220 1.518060
Diffstat (limited to 'intern')
0 files changed, 0 insertions, 0 deletions