Safari 4: Caching Images of Every Page You Visit, Where it’s Hard For You To Find Them

Safari 4 beta leaves data, privacy trail in its wake – MAC.BLORGE.

Yesterday I decided to give Safari 4 Beta another try.  It’s supposed to be super fast and all, and I was thinking about those sites like Facebook and which seem to cause a ton of extra CPU usage when I leave them open… thinking maybe a more efficient Javascript engine would make them more pleasant to have around.

I tried it, and it was super fast, but if anything it achieved that speed by causing even worse CPU churn, so after a while oohing and aahing at its speed I toasted it, uninstalled and went back to Firefox 3.

Then I read this article, and the article it links to, and sure enough, in the short part of the evening I was using Safari 4 I had generated 170+ megs of data in a hidden, can’t-reach-without-command-line-fu location on my computer, not even in my personal user directory.  (I don’t think it’s hidden for nefarious reasons; Apple doesn’t roll like that.  I think it’s hidden because this cache is what the Apple engineers needed to achieve the effect they wanted, and they didn’t think you should have to worry your pretty little head about how they did it or how much of your disk space they used to do it.)

And darned if that hidden cache directory didn’t include full size image files of every site I’d visited during that time.  Which stayed behind after I uninstalled the beta.  How much data would there have been after a week of usage?  A month?

Lame, Apple.  Lame.

Finder Grinder: The CPU Syndrome

I’ve had a problem for a while on my macbook (running Leopard) that the Finder would just suck up CPU like crazy.  Restarting it often didn’t change anything.  I never found any useful information googling on it, until recently.

In this thread I hit on the idea of sampling the Finder process, and when I did so, I found that the biggest sucker of CPU was a function called “getdirentriesattr.”  Googling *that* up, I found reports that this function is used iterating through really big directories calculating folder sizes, and that in fact:

It looks like it is iterating some directory to get its total size. This happens on my machine when I either File Menu->Get Info on a very large folder, or view the folder in List View with Calculate Folder Sizes enabled. Its trying to get the total size of that directory. Apparently there is a bug where the Finder doesn’t stop trying to get the size after you have stopped viewing that folder, or even turned off Calculate Folder Sizes in List View (until you quit/relaunch the Finder).

I opened up a Finder window, pulled down View – Show View Options, and deselected “calculate all sizes.”  I made that the default, and then restarted Finder.

Suddenly my Finder’s at 0% CPU instead of a steady 20-80%.  And my fan isn’t on all the time.

SWEET.  Thank you Apple for having the tools that made it possible to dig down into the process and discover this, but nuts to you for that bug existing in the first place!

MacPorts: Everything Else Sucks More

Random Bits and Pieces: MacPorts are Fatally Flawed gives a good list of reasons why MacPorts sucks.  I wanted to upgrade the Gimp to the latest and greatest, and I put the wrong flag into the upgrade command and it’s taken all damn day and upgraded nearly every port I had, so far, except the Gimp itself.  Ports I had forgotten I ever installed.  Compiling, compiling, compiling.

And I didn’t *know* I’d screwed up because sometimes even when you do everything *right* it goes nuts like that.

The big Macports thing is: you compile everything yourself.  This gives you great flexibility if you want some unusual variant of a program.  But the 95% of the time that you don’t, that you want a standard version of the program just like everybody else’s… tough.  You’re compiling it yourself no matter how long it takes.

It’d be nice if you could just download binary packages from a central repository like you can with most Linux package management systems, and not have to compile them all yourself.  It used to be possible to do that with fink, an alternative to macports, but in doing so you only got the “stable” (read: ancient and crusty) versions of the packages.  For the “unstable” (read: created this millennium) versions, you had to compile them yourself, and if you wanted *any* unstable packages, you pretty much had to use all  unstable packages… and fink’s set of packages is smaller and less up-to-date than macports’s, so you were screwed.

Now, when everything goes right with macports, it goes *really* right.  You can install a very up-to-date version of the Gimp, with a proper Mac application bundle, with some of the coolest new plugins (liquid rescale, RAW support via ufraw) and with the ability to access a wide variety of scanners via xsane, all built in.  That’s exquisitely cool.

But when things go wrong, there’s not much you can do about it, and the hassle you have to go through compiling even when things are going right is a complete pain.  This ain’t Gentoo, kids.  It’s a staid operating system for people who don’t want to invest the time and pain that a true open source operating system demands.  Does it have to be this way?

Guess it does.

X11 Tablet Support On Mac

XQuartz, the cutting edge version of Apple’s, supports pressure-sensitive tablets as of the latest version, 2.3.0. Or so says the page — I have not personally confirmed this yet.

This could finally put to rest my Linux twitchiness if it turns out to work!

UPDATE: I can confirm, through the xinput commandline tool, that it does now get pressure and location data. However, as noted here by Jeremy Huddleston, GTK and therefore the Gimp and Inkscape are not receiving that data, for reasons which are unclear. Furthermore, with this New Hotness working, you can’t use the tablet the way you used to be able to — as a mouse. Because tablet taps don’t register as mouse clicks.

So a threshold has been crossed, but this whole wacom/XQuartz thing is still not ready for prime time.

And it’s a total hassle to uninstall XQuartz once you installed it (you have to blow X11 away completely and reinstall from your OS X install DVD.)

UPDATE 2: “Total hassle” doesn’t begin to describe it. Despite having reinstalled from the DVD per instructions, X11 doesn’t work at all anymore. I’m not sure what I can do to restore it short of a total OS reinstall from the DVD, restoring my stuff from my Time Machine backup. Ouch.


I did the reinstall. X11 stopped working. Apparently a bug in Apple’s 10.5.3/4 combo update hoses X11 completely. Guess what the recommended fix is?

Install xquartz from macosforge. WHICH IS WHAT STARTED THE DAMN PROBLEM.

I’m going to try an earlier version of Xquartz (2.2.3) in the hopes that I get the fix without hosing my tablet in X11 again.


Just confirming that installing the next-to-last release of Xquartz (2.2.3) brought things back to normal. Geez, and I think of Linux as being full of bullshit technical hoops to jump through!

OK, NOW the iPhone is cool.

John M McIntosh announced on the squeak-dev mailing list that “I’m pleased to say that I’m one of the 1.5% of the iPhone developer population that has been accepted to officially build applications for distribution via Apple’s iPhone Application Store.”

He’s prepared a 93-day plan to build a new fully documented Objective C based source tree to host the Squeak VM on the iPhone and in addition as a 64bit VM on OS-X. He’s already collaborating with Impara who are looking at adapting the Squeak UI to the iPhone’s multi-touch paradigm and platform widgets, and is looking for further support (and funding) for this work.

John is also looking to offer support for Squeak developers hoping to make their applications available through the iPhone Store, although he notes that Apple has a number of restrictions limiting the types of applications that can be made available in this way.

[From Squeak on the iPhone! « The Weekly Squeak]

I love Smalltalk, specifically Squeak. I don’t actually use it for much, I have just enough experience playing around with it to see what is so sweet about it, but not enough to be really effective with it. Smalltalk on the iPhone? Now that’s cool.