Bug 489894

Summary: Selecting a .desktop file with a large icon on the desktop causes extreme lag.
Product: [Plasma] plasmashell Reporter: dylanhammond865
Component: FolderAssignee: Plasma Bugs List <plasma-bugs>
Status: CONFIRMED ---    
Severity: minor CC: alt, hein, kdedev, nate
Priority: NOR    
Version: 6.1.2   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: The top file is the .desktop file in question, the bottom file is the image used as the icon for the top file. Selecting and deselecting bottom file does not cause lag, while the top file does.

Description dylanhammond865 2024-07-07 21:49:57 UTC
Created attachment 171468 [details]
The top file is the .desktop file in question, the bottom file is the image used as the icon for the top file. Selecting and deselecting bottom file does not cause lag, while the top file does.

SUMMARY
Selecting a .desktop file with a large icon on the desktop causes extreme lag.

STEPS TO REPRODUCE
1. Create a .desktop file with "Icon" set to a large file (over 2MB causes noticable lag on my system, an 18MB png was used for the video)
2. Select and deselect the file on the desktop

OBSERVED RESULT
Doing this repeatedly can cause 1 core to be pegged at 100% for extended periods of time.

EXPECTED RESULT
No lag

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2
Kernel Version: 6.9.7-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-6600 CPU @ 3.30GHz
Memory: 22.9 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 530
Manufacturer: HP
Product Name: HP ProDesk 600 G2 SFF
Comment 1 Nate Graham 2024-08-16 16:14:40 UTC
So basically, if you remove the filename extension from the file, the lag happens when you draw a box over it?

I tried this with a 34 MB PNG I have and can't reproduce it in current git master. Any chance you can find a way to send over the actual file that causes the issue for you so I can test with that specifically?
Comment 2 dylanhammond865 2024-08-19 21:06:20 UTC
(In reply to Nate Graham from comment #1)
> So basically, if you remove the filename extension from the file, the lag
> happens when you draw a box over it?
> 
> I tried this with a 34 MB PNG I have and can't reproduce it in current git
> master. Any chance you can find a way to send over the actual file that
> causes the issue for you so I can test with that specifically?

As the title suggests, this bug is about .desktop files, which are links to programs.
The contents of the .desktop file should look like this: 

[Desktop Entry]
Name=Test file
Icon=/image.png

When given a 'Name', that name will visually replace its filename on the desktop.

This bug still exists in 6.1.4
Comment 3 Nate Graham 2024-08-20 21:47:11 UTC
Oops. Can reproduce it now. Only seems to happen on Folder View.