kornelski / ImageAlpha

Mac GUI for pngquant, pngnq and posterizer
https://pngmini.com
GNU General Public License v2.0
470 stars 63 forks source link

Slow startup on Sierra #35

Open simonrob opened 7 years ago

simonrob commented 7 years ago

I've just upgraded to a new laptop with Sierra, and ImageAlpha is now very slow to start.

Previously (Mountain Lion), the ImageAlpha window appeared after one "bounce" of the icon; now it takes 9-10 each time.

Do you know what might be causing this?

kornelski commented 7 years ago

The app is written in Python and ObjC, so on startup it needs to compile a lot of Python code. It should be less bad after the very first startup on a new system.

Still, these two are slow complex beasts, so I'm afraid they're out of my control.

If you're looking for something quicker, there's a "Lossy" option in ImageOptim (native app, starts quickly): https://imageoptim.com/mac

and I've got a basic web interface for pngquant here: https://imageoptim.com/online

These don't have a preview like ImageAlpha, but offer the same level of compression.

simonrob commented 7 years ago

Thanks - the slow start persists for me no matter how many times I open ImageAlpha, but I'll persevere because its interface is so useful for helping choose the level of compression required.

I'm a longtime happy user of both ImageAlpha and ImageOptim - thanks for all the great work. I'll try building locally and investigate to see whether I can contribute any changes to speed it up.

gingerbeardman commented 6 years ago

I get the slow start (High Sierra, 12 bounces!) each and every launch. It's supremely aggravating.

Where is the compiled Python stored? I can then check it is where it should be.

Can't the Python be pre-compiled inside the app?

kornelski commented 6 years ago

Shipping pre-compiled code in the app won't make any difference, because code in the app itself is quite small. I wouldn't be surprised if all the code in the app was just 1% of the code Python runs on startup — while building wrapper objects for all of Cocoa.

kornelski commented 6 years ago

I recommend switching to ImageOptim's lossy mode instead. It uses the same compression, but it's all native and starts quickly.

gingerbeardman commented 6 years ago

Thanks for the suggestion, but I really need manual control and visual inspection.