The Shape of Everything
A website mostly about Mac stuff, written by August "Gus" Mueller
» Acorn
» Retrobatch
» Mastodon
» Micro.blog
» Instagram
» Github
» Maybe Pizza?
» Archives
» Feed
» Micro feed
March 26, 2014

Wow, over a month since the last progress report. I'm a slacker!

Hello from Mukilteo, WA
OK, I haven't been slacking, we've actually been in the process of purchasing and then moving into a new home. We hope to put the old house on the market real soon now.

Flying Meat's new home base (where we sleep that is) has relocated from South Everett to Mukilteo, WA.

We've still got the office in downtown Everett, and the commute is the same (hurray). But what we get from the move is a nice view and a good school for the little girl to walk to when she gets older.

But what about the pizza oven‽

Everyone I've told seems very concerned about this. I'm sad to announce that Dante (my pizza oven) is staying behind to be loved by the new owners. I'm afraid that trying to move it would destroy it (it weighs over 2 tons) and besides, this is a great excuse to get another one later on this year (I've got some ideas for improvements). In the meantime it's back to indoor oven cooking, and I'm sure I'll be getting more use out of Marvin as well.

Check your QuickLook plugins
I have managed to get a little bit of work done though, mostly in the way of bug fixes for Acorn. One interesting one was in Acorn's QuickLook plugin.

This particular bug came to me when a customer was having big stalls (and sometimes fails) when loading previews of Acorn via QuickLook. The customer was working with 18mp / 500 megabyte Acorn files, and they were taking forever to load. Acorn saves a composite of all the layers in an image as part of it's file format (for quick rendering via QuickLook), so I was surprised that it wasn't speedy. But when profiling the plugin, I noticed that there was a lot of time spent flushing an image in a PDF context. After a bit of snooping I discovered when drawing in a QuickLook context, you can ask the system to make a PDF context or a bitmap context depending on your needs.

Apparently, I made a bad decision a long time ago.

Acorn was using a PDF context, which isn't especially great for bitmap formats (which is what the preview is stored as). I changed things around so that QuickLook made a bitmap context for rendering (by one of the parameters in QLPreviewRequestCreateContext) and this made things go way faster.

I'm not sure why I originally chose the PDF context. Acorn used to be vector only, so it's possible that's why I made PDF context decision many years ago. Anyway— things are better for the next release of Acorn (which will be version 4.4. Grab a latest build if you'd like to play with it).

I also took the opportunity to make one other change for previews— and that was adding a thumbnail composite to .acorn files (if the image is above 256x256 pixels). In the case of RAW files (which are usually huge), it was pretty dumb for Acorn to load up a 18MP image to render into a 128x128 square. So now the thumbnails show up super fast if there's the thumbnail cache. This is only for files saved in Acorn 4.4, otherwise it'll fall back to the full image composite.

FMDB stuff
In the 2014.02.15 progress report, I mentioned that I needed to bring back some wait loops for handing locks on the database.

I wasn't really looking forward to this changes since it added complexity to FMDB that I honestly thought SQLite should be doing for me. Then I discovered sqlite3_busy_handler, which is a built in function to SQLite, and which lets me do away with the retry loops.

Awesomesauce.

This new code is on a branch ("busyloopback") and I'll be bringing it over to mainline after I've used it for a while in Acorn.

Cocoa Script
I put up a dev build of the current sources here: http://jstalk.org/download/CocoaScriptPreview.zip. Eventually I'll do things like setup a real website and such - but I've got boxes to unpack and things to fix right now.