After reading some reports about the difference of performance between ChocoFlop and CoreImage Funhouse (Apple’s original showoff example app for CoreImage filters) I decided to rethink and rewrite the rendering stack of the app.
The biggest error in design is due to the fact that ChocoFlop was originally developped on a G4 mac mini which didn’t support any CoreImage acceleration through the CPU. As a result I had written a lot of small caches everywhere to make it feel decent on this machine. Over time however I stopped testing it on such machine. So in the end I had both disavantages.
CoreImage is designed around a simple idea: That you only need to render what you need to display. And ChocoFlop so far was working the opposite way. For example when applying a hue filter on a 10 mb pixel image the filter would get applied to the whole image. Also when painting the paint buffer would be applie on the whole image. This basically made using ChocoFlop on a 6 megapixel image a real pain, even on a modern machine (such as my first-gen ATIx1600@128mb macbook pro). To fix this problem the app tried to scale down the whole document an rescale it back for display while filtering. This was both quite slow and ugly-looking (big blurry pixels and filter handles that you just couldn’t grab without blocking the whole UI).
After working on it for a while I am glad to announce that the upcoming release (0.71) will feel – and actually be – much faster than the previous series. When it gets released I invite you to open an 10 megapixels image and add a filter (say torus lens) on it and drag it around. It will change from unuseable to smooth, really. Same goes for paiting: the current release is not useable on a 10 mbpixel image, you’ll paint big straight lines and it’s pretty unresponsive. In the upcoming version you can actually paint what you want to paint (on my machine at least).
I still have to tackle so issues and I am bit tired to finish them today but hopefully tomorrow will be a more productive day (a.k.a. the kind without a sister crashing in at your place with beers when you were just about to get rid of a nasty bug). So stay tuned and expect great changes!