image-optimizer icon indicating copy to clipboard operation
image-optimizer copied to clipboard

[Bug] Optimization of UI No Response

Open PublicWorld opened this issue 2 years ago • 4 comments
trafficstars

Describe the bug

Hi, when I try to upload a dozen photos in this macOS app, around 100 MB size, the compression process will cause the interface to keep loading and not be able to do anything, so do we have any optimization plan to solve this problem?

PublicWorld avatar Nov 27 '22 07:11 PublicWorld

@Christopher-Hayes Hi, I am glad to see that you are also involved in this project. Do you have any suggestions or solutions?

PublicWorld avatar Nov 27 '22 07:11 PublicWorld

Hi @NumberCode I haven't been actively involved on this project for several months, so I can't offer any immediate fixes. I'll try to take a look at some point in December.

If you or anyone wants to try working on this - the first place I would take a look would be how file data is getting read into working memory and check if multiple files together are causing a memory spike that is freezing Electron. Optimization could involve making sure files are all gettings streamed (rather than put into working memory objects), checking for memory leaks / if any working memory file data is not getting garbage collected for some reason (Map vs WeakMap), or other ways to mitigate memory spikes.

Generally, the UI shouldn't freeze if we're doing the hard work on the Main thread and leaving the UI interactable on the Renderer thread. Freezing would usually mean the app hit some hardware limit like memory. But, there are probably improvements that could be made showing task progress, especially for lots of files / big files.

Christopher-Hayes avatar Nov 28 '22 14:11 Christopher-Hayes

Thank you so much for your response! It would be great if you were willing to take the time to solve this problem! I like this software very much, but I am not a professional front-end developer and don't know how to solve it. I tried searching the Internet and found that it seemed possible to use remote to create a hidden window to handle time-consuming tasks, how dou you think?

PublicWorld avatar Nov 29 '22 03:11 PublicWorld

🥹 No one handles this~

PublicWorld avatar Apr 18 '23 13:04 PublicWorld