Maniphest T96706

Tracker tracking slowing down speed up hack (make it permanent?)
Closed, Resolved

Assigned To
Philipp Oeser (lichtwerk)
Authored By
Grzegorz Kimbar (gkimbar)
Mar 22 2022, 12:11 PM
Tags
  • BF Blender
  • VFX & Video
  • Motion Tracking
Subscribers
Grzegorz Kimbar (gkimbar)
Omar Emara (OmarSquircleArt)
Philipp Oeser (lichtwerk)

Description

System Information
Operating system: Windows 10
Graphics card: Nvidia GTX1650Ti, Quadro P 2200, Intel UHD (I've tested this on three systems)

Blender Version
Broken: (version: 3.1.0, branch: master, commit date: 2022-03-08 18:16, hash: c77597cd0e15, type: release)

Short description of error

I'm not even sure it is a bug, but that's what I found. I'm trying to track a relatively long video (38400 frames 3GB) with trackers match set to Keyframe. It works, but the tracking speed slows down quickly after (I guess) the memory cache is filled up (I've experimented with Preferences\System\Memory Cache Limit). However, I can free the cache by stopping the tracking (ESC), pressing Build Proxy/Timecode button (even if I'm not setting any proxies to be used) and have full-speed tracking for a few hundred frames more (depending on system memory limit). Rinse and repeat. It's a lot of clicking but is much faster than waiting. The problem does not occur with Previous frame match trackers (but they drift too much in my setting).

Can we make cache freeing on-the-go a permanent option?

Exact steps for others to reproduce the error

The freeing of the memory can be seen on the progress-bar below the clip. This is with 6GB system memory on 8GB machine with Intel UHD (the worst setup I have) and it's still decent. Upgrading to 32GB gives me only longer "bursts" between clearing cache.

Related Objects

Mentioned Here
rBe08180fdab89: Fix slow tracking of long sequences
rBc77597cd0e15: Fix T95843: Invalid mesh runtime data after sculpt undo

Event Timeline

Grzegorz Kimbar (gkimbar) created this task.Mar 22 2022, 12:11 PM
Grzegorz Kimbar (gkimbar) updated the task description.Mar 22 2022, 1:09 PM
Omar Emara (OmarSquircleArt) changed the task status from Needs Triage to Needs Information from User.Mar 24 2022, 8:52 AM
Omar Emara (OmarSquircleArt) added a subscriber: Omar Emara (OmarSquircleArt).

I am guessing that your OS is swapping when the RAM is full with cache. Just to make sure, did you increase or decrease the Memory Cache Limit? I would try setting it to something very low, like 1. Does that work?

Grzegorz Kimbar (gkimbar) added a comment.Apr 2 2022, 12:00 PM
In T96706#1329036, @Omar Emara (OmarSquircleArt) wrote:

I am guessing that your OS is swapping when the RAM is full with cache. Just to make sure, did you increase or decrease the Memory Cache Limit? I would try setting it to something very low, like 1. Does that work?

I am absolutely positive it is not a swap problem. I've tested the issue on different levels of Cache Limit, on different machines with different system RAM, without other applications running etc. I also can tell when the machine is swapping.

The only common factor is the use of Keyframe match setting. The problem disappears instantly when I change it to the Previous frame. Then the old cache is constantly freed and tracking proceeds at full speed. When the Keyframe it is almost like Blender wants to keep the first keyframe in cache, cannot mark it as "old" and free it. Or maybe the cache is designed in a way that it can contain only continuos set of frames? − not just 1st and 1000th to 1200th for example (1st for the kayframe and 1000th to 1200th for the actual tracking).

Omar Emara (OmarSquircleArt) changed the task status from Needs Information from User to Needs Triage.May 25 2022, 12:20 PM
Philipp Oeser (lichtwerk) added projects: VFX & Video, Motion Tracking.Aug 17 2022, 10:47 AM
Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Needs Information from User.Aug 17 2022, 11:40 AM
Philipp Oeser (lichtwerk) added a subscriber: Philipp Oeser (lichtwerk).

This should be fixed already by rBe08180fdab89: Fix slow tracking of long sequences

@Grzegorz Kimbar (gkimbar) : could you retry this in 3.2 (or a daily build from https://builder.blender.org/download/daily/)?

Grzegorz Kimbar (gkimbar) added a comment.Aug 18 2022, 11:32 AM

Yes, everything works perfectly now. Thanks a lot!

Philipp Oeser (lichtwerk) closed this task as Resolved.Aug 18 2022, 11:34 AM
Philipp Oeser (lichtwerk) claimed this task.

OK, thx getting back, will close then.