I thought I’d finally give the Image Optimizer a try. I clicked “Scan” and it’s been scanning for about an hour without any indication anything is actually happening (Total Reductions is still zero).
I’m unclear from the UI if “scan” means to create an index which is followed by a prompt to begin optimizing or if it’s actually alrteady tyring to optimize things.
This is a medium sized site (15GB uploads folder).
I can’t figure out a way to kill the process either.
I’m glad you’re giving it a try – especially stress-testing on a larger uploads folder.
The scan job is scanning the filesystem for images that can be optimized. Once that scan has finished, you’ll be prompted do the actual optimization process. There’s a ~30 sec video on this help doc that shows everything on a smaller site:
It’s still stuck on scanning. I know it’s doing “something” because Local is using 50-100% of 1 CPU continuously. But it’s literally been over an hour. Restarting, and stoping the site had no affect (didn’t think it would necessarily), so I closed Local and reopened. That stopped things.
However, in the mean time I kind of gave up and threw another copy of the uploads folder at ImageOptim, so that’s now using all my CPUs.
FWIW, uploads is 11.9 GB on disk for 125,070 items. It’s not small, but it’s huge either. I do know there is at least one file in there with the wrong extension (PSD someone renamed to .jpg) as ImageOptim refused to compress it.
I’ll try restarting, but I do feel this UI needs some kind of feedback that “scanning” is taking place. Like “scanned 1000 or 125,070 items” or something… although I still think it’s dying in the background without notice.
This was an interesting thing to replicate. I’m not sure what the limit is in terms of size, but it looks like Local is spawning the “Local Helper” process which I was able to kill with Activity Monitor (I think I remember you’re on a mac)
I’ll put something in the backlog for the devs to look into the performance of image optimizer.
For others that want an easy-ish was to create a bunch of jpgs to take up space, I downloaded an image from unsplash, moved it to the uploads folder of a site and then ran these terminal commands:
mkdir -p {2010..2020}/{01..12}
for d in $(echo {01..99} | tr " " "\n"); do cp kevin-oetiker-k51zbGzqqQ-unsplash.jpg ${d}.jpg ; done;
for d in $(echo {2010..2020}/{01..12} | tr " " "\n"); do cp *.jpg ${d}/ ; done;
du -sh ./
lol, nice code. I’m putting that in a gist to run on some poor unsuspecting friend’s laptop next time I’m at a WordCamp and they leave their laptop unattended. I think this is why I never see @afragen bring his laptop to events…
FYI, Local Beta Helper is running according to activity monitor (this is inside iStat Menus), it’s just it’s been quite a while and still no actual feedback in the Local UI.