eddiesigner / sketch-dark-mode

Generate a dark mode version of any Sketch document, the right way.
https://sketch-dark-mode.eduardogomez.io
62 stars 7 forks source link

High CPU Usage / Sketch freezing #17

Open nomisum opened 3 years ago

nomisum commented 3 years ago

Sketch (69.2) gets nearly unresponsive when trying out the plugin. Might be because it runs in the error of not having prepared every color perfectly (runs in warning popup), still shouldnt lead to complete unstability.

Otherwise looks very promising, will test further 👍

nomisum commented 3 years ago

I will just drop more feedback in here, dont want to spam issues.

This warning comes even when I have correctly set up my colors in an external library and use only that (which is the way to keep things neatly organized). Switching to Library Colors works, but its kind of hidden.

Bildschirmfoto 2020-11-18 um 11 37 10

Also I would love to be able to choose either a variable as a replacement (as far as I understand I can only put in hex?) or a whole library (with same names automatically matching maybe?).

eddiesigner commented 3 years ago

Thanks for the feedback! Just out of curiosity, about how many libraries do you have installed? I tested the plugin on different Macs and don't have that problem, of course I don't have several libraries installed so that could be the reason. However, after reviewing the code I found something that can be improved and maybe that could fix the issue for your case.

Also, when exactly Sketch gets unresponsive? while you open the Palette window or while you try to generate a dark mode version of your document/artboards?

About the warning message, it's normal that you see it if you haven't created a color palette yet for your document, although I could change the copy a little bit so it doesn't look like a warning message but like a empty/initial state.

Lastly, I think the idea of using color variables as replacements would be kinda interesting but don't think I have time at the moment to implement something like that, maybe later.

xaicks commented 3 years ago

I have the same issues as @nomisum. The sketch for me looks unresponsive when I tried to define the variations for each colour palette. Is this compatible with Sketch 70+ ?

eddiesigner commented 3 years ago

@xaicks Yes, the plugin is compatible with Sketch 70+

Can you tell me please about how many libraries do you have installed?

xaicks commented 3 years ago

@eddiesigner I have just one installed, and it's a default one "Migrated Global Colors" from --vars. This is weird... the performance is total compromised.

eddiesigner commented 3 years ago

@xaicks I see, then the problem is not related to the number of libraries installed. I tested the plugin on three different MacBooks and I have not experienced this problem.

Do you have installed some plugin that modify in some way the Sketch UI? Like Craft for example? Also, are you running Sketch on one of the new Macs with the M1 chip? What Mac OS version do you have installed?

I will try to update some dependencies to see if that fixes the issue.

xaicks commented 3 years ago

Hello @eddiesigner, I've Craft installed and Midnight plugin I will try this on iMac 5k without any plugin installed, I will back to you with the result.

nomisum commented 3 years ago

Sorry for the late reply, I somehow missed your answer.

how many libraries do you have installed?

11 libraries so far, all in Sketch Cloud.

Also, when exactly Sketch gets unresponsive? while you open the Palette window or while you try to generate a dark mode version of your document/artboards?

As soon as I open the "Manage Palette" Window. Btw. after a Sketch Crash and updating all plugins problem seems to have disappeared. Will report back if this is only temporary.

Lastly, I think the idea of using color variables as replacements would be kinda interesting but don't think I have time at the moment to implement something like that, maybe later.

Thanks for considering :) While your plugin works I miss an easy way to replicate the dark color palette. My workflow includes creating new documents all the time and each time I would have to newly assign each light color its dark equivalent (if I am not mistaken). Loading up/switching an entire dark theme library with color variables as a replacement would be much faster.