Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » FileSel&FileList, Path » FileSel takes quite a lot of CPU on Windows
Re: FileSel takes quite a lot of CPU on Windows [message #58420 is a reply to message #58419] Wed, 18 May 2022 15:01 Go to previous messageGo to previous message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Mirek,

It looks like a flag to avoid lookup of exe icons helps here. It needs just four lines of code added/changed in FileSel.

Add to class FileSel in FileSel.h:
	bool		load_exe_icons;
	FileSel& LoadExeIcons(bool b = true)           { load_exe_icons = b; return *this; }


Add if condition to end of FileSel::SearchLoad() in FileSel.cpp:
	if(load_exe_icons) lazyicons.Start(list, d, WhenIcon);


Reset flag default value added in FileSel::FileSel():
	load_exe_icons=true;


For my use, I would nearly always use LoadExeIcons(false); -- even as default -- as my default usage is to open documents, not exe files. However, setting load_exe_icons=true; by default, retains original default behavior.

Best regards,

Tom

[Updated on: Wed, 18 May 2022 15:06]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FileSelNative::AllFilesType() doesn't show files without extensions on Linux
Next Topic: BUG + FIX: FileSelNative shows default filename as some trash characters
Goto Forum:
  


Current Time: Sat Apr 27 15:49:34 CEST 2024

Total time taken to generate the page: 0.04679 seconds