FocusTreeAndEventManager icon indicating copy to clipboard operation
FocusTreeAndEventManager copied to clipboard

Image loading slowdown

Open Chupachu opened this issue 6 years ago • 1 comments

I've found that after several icons in the focus tree editor have been loaded and set, the program begins to gradually slow down more and more, and take longer to pull up the icons. Initially, it takes less than a second, but it gains about a second of slowdown for every icon added to the tree, eventually to the point of taking 30 seconds or longer in some cases. The only solution I could think is (if the issue is with refreshing the icons) to add a 'refresh' button so it doesn't have to pull the icons every time and only updates when the user chooses. I hope this helps improve the program.

Chupachu avatar Mar 07 '18 22:03 Chupachu

Yes, this is a very bad design decision on my part that I haven,t had the time to fix.

Basically, I preload every focus icon image in the application's memory for later use. Unfortunately, WPF makes a copy of the content of image files whether it is served from memory or from disk. The thing is that, if served from memory, WPF does not cache the image so you end up with a thousand copy of the same image. The preloading animation ends up causing more issues than it solves.

When I get the time to work on this again, I will migrate from WPF to a more image friendly UI framework.

Minivera avatar Mar 20 '18 12:03 Minivera