Bug 431513 - Dolphin maxes out a CPU core when downloading a video file
Summary: Dolphin maxes out a CPU core when downloading a video file
Status: RESOLVED WORKSFORME
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: Thumbnails and previews (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-12 18:27 UTC by Sami
Modified: 2021-06-24 13:00 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sami 2021-01-12 18:27:38 UTC
SUMMARY
Dolphin maxes out a CPU core when you have a folder open where a video file is being downloaded to. 

STEPS TO REPRODUCE
1. Enable thumbnails for videos in Dolphin
2. Open a folder in Dolphin
3. Start downloading a video to the folder

OBSERVED RESULT
Dolphin maxes out a CPU core because the video file keeps changing, so it generates a new thumbnail for it over and over again.

EXPECTED RESULT
Dolphin limits the frequency of thumbnail creation for a file, or detects the file is being downloaded/copied and generates a thumbnail only when the file has been downloaded.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch
KDE Plasma Version: 5.20.4
KDE Frameworks Version: 5.77.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Has been a bug for the 2 years I've used KDE
Comment 1 Justin Zobel 2021-01-15 02:35:07 UTC
Do you have an example file that we can use that you had issues with? That way we can test with the exact same information.

What method was used to download the file, was it downloaded via FTP, HTTP, BitTorrent, etc?
Comment 2 Sami 2021-01-15 05:23:57 UTC
(In reply to Justin Zobel from comment #1)
> Do you have an example file that we can use that you had issues with? That
> way we can test with the exact same information.
> 
> What method was used to download the file, was it downloaded via FTP, HTTP,
> BitTorrent, etc?

Mostly just BitTorrent and .mkv files

With SFTP I get periodic spikes (every 2 seconds or so) up to 20% usage on a single core on my Ryzen 3600. BitTorrent always maxes out a core. Copying a video file from one disk to another also causes this, but it's not as bad as BitTorrent. Still, creating the thumbnail uses more of the CPU than the actual copying, or anything else on my system. Does not happen with .mp4 files (Dolphin doesn't create thumbnails for incomplete .mp4 files). Converting (re-encoding) an .mp4 to an .mkv with ffmpeg also causes thumbnail.so to use a lot of CPU, but this is less noticeable because ffmpeg already almost maxes out all the cores.

Another report of the same or a similar bug (see comments)
https://bugs.kde.org/show_bug.cgi?id=376676
Comment 3 Justin Zobel 2021-01-15 05:37:13 UTC
I did a quick search but couldn't find any (legal) videos to download via torrent as mkv. They were all mp4 or webm.

Are you able to supply a legal link to content that I can test with?
Comment 4 Bug Janitor Service 2021-01-30 04:33:18 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2021-02-14 04:33:13 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 6 Nagy Tibor 2021-06-24 13:00:53 UTC
I've also experienced this bug when downloading videos from the Internet Archive with wget.

Operating System: KDE neon 5.22
KDE Plasma Version: 5.22.1
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.3