yikuansun / photopealoader

Photopea desktop app that loads local files and plugins
MIT License
9 stars 0 forks source link

Add autosave/backup #5

Open PAEz opened 2 years ago

PAEz commented 2 years ago

Reminder to myself to look at adding autosave/backup. Should be ok, just need to check how long it takes to compile a very large PSD and if it will cause problems (like locking up the UI). The saving shouldnt be a problem. Now I just need to find/make a large PSD with many layers and wotnot.

yikuansun commented 2 years ago

I believe there is an autosave parameter in environment. I have some very big PSD files on my storage, so I'll experiment with it.

yikuansun commented 2 years ago

Yup... it caused major issues with locking up the UI. The editor also started to glitch out after a save or two (some layers wouldn't be shown, etc.)

Edit: that PSD I was testing on is corrupted now. Luckily I'd already finished that project, and it wasn't super important anyway.

PAEz commented 2 years ago

Ddint notice the environment feature, oops. Any chance you could upload one of those big psd files somewhere? Id love to have a look.

The corruption thing is why I was thinking of making it a backup to some other file, just in case. Glad you didnt loose anything important.

yikuansun commented 2 years ago

Here's a PSD template that I made a while back, it's around 5.4 MB : https://www.photopea.com/#tJdt7ZyIy I don't want to upload files that are way too big, but if you duplicate the Template group a few times, you'll get a much bigger file. Photopea doesn't let you save the file locally (since it was a template), but you can copy all of the layers to a new document and you'll be able to save that PSD.

PAEz commented 2 years ago

Thanks for that. I just copied the template layer 10 times and got the psd file to 105meg. Saved it manually over and over (about 10 times) in Chrome (FF wouldnt paste?) and the other two files I had open bugged but not the one I was saving. The task manager said that chrome was using around 5gig the whole time (28 tabs open). The interface does lock for while (7-8 seconds), which would be annoying to the user, especially if theyre in the middle of something, but maybe could check to see if mouse button is down and not do it then. Electron was WAY worse. But this could come down to the fact that the default for save is to use compression (that file is 42.8meg) and I get these errors in the console...... [11016:0327/005608.772:ERROR:gpu_process_host.cc(979)] GPU process exited unexpectedly: exit_code=34 [21372:0327/005738.586:ERROR:gpu_init.cc(454)] Passthrough is not supported, GL is disabled, ANGLE is ...the first one is new, never seen that one before. The second one happens every time I use PP in electron. Ive looked at this before and couldnt find a solution except to use an older version of Electron so Ive just been ignoring it for now (using an older version of electron would be fine). Ill have a play with all this later, later, wouldnt mind seeing what happens if requested for by the OE with scripting....EDIT: idiot, Im doing that every time I save ;P

yikuansun commented 2 years ago

Wow...