dive icon indicating copy to clipboard operation
dive copied to clipboard

Run KPF processing in worker task

Open subdavis opened this issue 5 years ago • 9 comments
trafficstars

Should run KPF generation in a worker task cause it's hefty.

This actually gets into a "race" condition if a video is uploaded with KPF: the video and the KPF processing must complete before the dataset can be marked for annotation. How do we handle this?

CC @AlmightyYakob and @mattrix27

subdavis avatar Jul 31 '20 15:07 subdavis

There's also the issue with determining FPS described in #245

subdavis avatar Jul 31 '20 15:07 subdavis

We could have an endpoint for a folder that returns if it's currently being processed or not (which would just run a check on jobs), since the post-process job could conceivably take long on other tasks too, like image/video conversion, if the files are large and/or there's a lot of them.

Then on the front-end we could just have a spinning icon or something next to a folder (instead of annotate), that indicates that it's still being processed.

jjnesbitt avatar Jul 31 '20 16:07 jjnesbitt

Just for clarification, do we still want the kpf generation to be a worker task?

mattrix27 avatar Jul 31 '20 17:07 mattrix27

IDK, maybe it's fine like it is.

Should we wait until we find a case where it takes more than a couple seconds?

subdavis avatar Jul 31 '20 17:07 subdavis

When I run it on my test data, it takes roughly ~20 seconds, not sure if that's long enough. It definitely takes longer for the video to convert, but wasn't sure if there was a ever a case where the conversion would be the bottleneck

mattrix27 avatar Jul 31 '20 17:07 mattrix27

In that case, it definitely needs to be a worker job. I haven't seen anything longer than 3-4 seconds, but I haven't tried to find anything bigger.

subdavis avatar Jul 31 '20 17:07 subdavis

When I run it on my test data, it takes roughly ~20 seconds, not sure if that's long enough. It definitely takes longer for the video to convert, but wasn't sure if there was a ever a case where the conversion would be the bottleneck

I'm using the same data as @mattrix27, so this is to be expected, but I also have similar load times of ~20 seconds.

jjnesbitt avatar Aug 03 '20 14:08 jjnesbitt

@subdavis, is this still valid?

waxlamp avatar Jan 12 '22 14:01 waxlamp

I'm trying to completely drop KPF support in #1037 so /shrug/

subdavis avatar Jan 12 '22 15:01 subdavis