C
C#2mo ago
Mr Anime

NEED HELP

Hey can someone have a look at my code I made this applicaiton a files ago and currently over the year of increasing the amount of files in select image folder it seem to have caused the application to freeze quite often. Base on what I have seen on the code it should be an issue where I havn't limit how many files the btnPickFolder_Click scan for since the freeze issue tends to happen when I set that file location. I tried adding buffer by making the applicaiton only pre load a set amount of images at a time but I don't believe this will solve my issues. Since thinking about this further this is an issue where the applictaion freezes since it loading too many images from the btnPickFolder_Click location into the applicaiton... Code: https://paste.mod.gg/qfpjizcshwuo/0
BlazeBin - qfpjizcshwuo
A tool for sharing your source code with the world!
No description
10 Replies
LPeter1997
LPeter19972mo ago
The UI freezes when the event handler runs, right? Is this Forms? If so, that's your problem, event handlers run on the UI thread, suggestion is using our lord and savior asynchronous code, or offload the work with a threadpool or something
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
LPeter1997
LPeter19972mo ago
There is IO in there with getting all files in the directory, on a non SSD that can already cause a stutter with a decently sized dir
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
LPeter1997
LPeter19972mo ago
Yeah but I had experienced that causing a fuckup in WF apps sadly on an old ass shitty HDD
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
LPeter1997
LPeter19972mo ago
I specified that bc thats the only one I know it runs the eventhandler on the UI thread Rest I have 0 idea about
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
Mr Anime
Mr AnimeOP2mo ago
Is there anythnig I can do in the code to make this more viable for a HDD drive I many use the app to mange image files and since the HDD is a much larger size than my SDD
LPeter1997
LPeter19972mo ago
We gave you advice on that
Want results from more Discord servers?
Add your server