Search Results

Speeding up Safari (Mac) by turning off its cache

WARNING: This procedure worked for me but I do not guarantee it will work for everyone. Use at your own risk. I primarily use Apple’s Safari browser, along with Google Chrome and Opera. Chrome is almost to the point where I might be willing to switch, but right now I’m very comfortable with Safari. With [...]

WARNING: This procedure worked for me but I do not guarantee it will work for everyone. Use at your own risk.

I primarily use Apple’s Safari browser, along with Google Chrome and Opera. Chrome is almost to the point where I might be willing to switch, but right now I’m very comfortable with Safari. With one major exception: after an hour or two of heavy use (multiple tabs and windows, reloading pages, lots of script-heavy pages) the browser’s performance drops to a level that is just unacceptable, especially on a 2.4GHz Core 2 Duo MacBook Pro with 4GB RAM. Page loads are sluggish and almost every click on a page results in a beachball for a few seconds. After a bit of Googling and experimenting I narrowed the problem to the browser cache. It seems that Safari’s mechanism for searching its cache is, let’s say, suboptimal.

Unlike most other browsers, Safari provides no user-accessible preference for adjusting or disabling its cache. So I looked deeper.

  1. Close all Safari tabs and windows. Don’t exit Safari, just close all its windows.
  2. Empty Safari’s cache: Safari menu -> Empty cache
  3. Exit Safari.
  4. Open Terminal*: Applications -> Terminal or Spotlight -> “Terminal”
  5. In the Terminal window, type:
    chmod a-w Library/Caches/com.apple.Safari/Cache.db
    (the above should be all one line; hit Return or Enter at the end of the line)
  6. Type: ls -al Library/Caches/com.apple.Safari/Cache.db
    (the above should be all one line; hit Return or Enter at the end of the line)
    You should see:
    -r--r--r-- 1 [your user name] staff 26624 Sep 28 17:33 Library/Caches/com.apple.Safari/Cache.db
    The details will differ, but the important part is -r--r--r-- which is Unix for “read-only for everyone”. That means Safari can’t write to its cache file, effectively turning it off.
  7. Relaunch Safari and browse normally. If your results are like mine, you’ll note that the sluggish performance of Safari after an hour or two of heavy use is now just gone.

*Just re-emphasizing the warning at the top of this post. If you follow these instructions exactly, nothing untoward should happen. However, Terminal is the window into the deepest, darkest inner workings of Mac OS X. It’s possible to really screw things up with a simple typo. If you have any doubt, don’t do it.

Comments off

Redirect 301 /old-and-broken /wp/new-hotness

I am (finally) working on redirecting everything from the old blog to the new, beautiful, WordPress blog. That involves a lot of fiddling with .htaccess Redirect rules and I’m a little worried that some regular expressions may creep in there. So far, all the monthly archive pages are redirected, so http://www.project-insomnia.com/2003_07_01_archive.shtml (which represents the Blogger-published [...]

I am (finally) working on redirecting everything from the old blog to the new, beautiful, WordPress blog. That involves a lot of fiddling with .htaccess Redirect rules and I’m a little worried that some regular expressions may creep in there. So far, all the monthly archive pages are redirected, so http://www.project-insomnia.com/2003_07_01_archive.shtml (which represents the Blogger-published archive of the first month’s worth of posts from the blog) will automatically redirect to http://www.project-insomnia.com/wp/2003/07. The tricky bit is going to be redirecting the post-pages, that is, the pages for each individual post, and I’m afraid that is where I’m going to need some regexp magic.

Progress is being made, slowly, ever slowly, but progress nonetheless.

(If you visited the new blog after the switchover and now note that things have changed again, yes, I changed templates to one that actually works. Learning curve.)

Comments off

I’m a Mac. Are you surprised?

I grew up with PCs. My first PC was an actual, original IBM PC model 5150 (which still lives, dormant for decades now, in my garage). Along the way, I worked on Commodores (VIC-20 and C-64), an Osborne, a Sinclair ZX-80, and there must have been an Apple ][ in there somewhere. But the PC [...]

I grew up with PCs. My first PC was an actual, original IBM PC model 5150 (which still lives, dormant for decades now, in my garage). Along the way, I worked on Commodores (VIC-20 and C-64), an Osborne, a Sinclair ZX-80, and there must have been an Apple ][ in there somewhere. But the PC standard won out and by the late 80s that was all I used. I went through a series of ever-more-powerful PCs, mostly home-built but some mass-market branded, for a number of years. I got to the point where I knew Windows, up through XP, like the back of the proverbial hand.

Meanwhile, Apple was evolving the Mac OS and finally released OS X, a true Unix-class OS with no legacy baggage. I watched from afar but as the OS and machines got better and better, I thought that I might be interested in making a switch–especially when Apple moved to Intel processors and it became possible to easily run Windows on Macs. Finally, I decided that when my then-current PC (a Dell Inspiron laptop) died, I'd buy a Mac notebook to replace it. Perversely, the Dell hung on for a year or two past its expected lifetime, but finally gave up the ghost when I (accidentally, I swear!) spilled most of a bowl of soup into it while working at home one day.

So I bought a MacBook Pro. I acclimated myself to OS X very quickly and was able to keep my Windows applications and workflows mostly intact with VMWare, running Windows side-by-side on OS X. But then a strange thing happened: I found I really didn't need Windows on my Mac after all. I tried keeping VMWare turned off for a week, then for a month, and then I just didn't turn it back on again and finally uninstalled it. There isn't anything that I could do on my Dell on Windows XP Pro that I can't do on my Mac, but (in my experience, as always) OS X beats Windows in the usability and stability department by a mile. And it's trite and over-used, but the Mac does indeed "just work". Things I want to do are right where I subconsciously expect them to be and work the way I instinctively want them to. There's tons of power under the hood, since OS X is a true Unix, but I don't need to deal with it unless I have to, or want to.

So yes, after years and years of being a PC, I'm a Mac.

Comments off

The Obsolete Man (or, now what do I do with this?)

In less than 24 hours all full-power broadcast TV stations in the U.S. will flip a switch to stop broadcasting their analog TV signals and will only broadcast TV signals in digital. This will make my cherished Casio TV-400 LCD minature color television obsolete. I bought it in early 1990 from a Radio Shack store [...]

In less than 24 hours all full-power broadcast TV stations in the U.S. will flip a switch to stop broadcasting their analog TV signals and will only broadcast TV signals in digital.

This will make my cherished Casio TV-400 LCD minature color television obsolete. I bought it in early 1990 from a Radio Shack store in a shopping mall near Fort Gordon, GA, where I was stationed for the second half of my Army training. Getting the common room TV tuned to whatever station “Star Trek: The Next Generation” was on was generally not going to happen, so this was my solution.

Since then, the little TV-400 has been useful now and again for baseball games (bring it to the stadium to see the instant replays they won’t show on DiamondVision), for breaking news (brought it to the office on 9/11) and, with the appropriate adapter, as a quick way to see if a given cable-TV outlet was active.

As of tomorrow, all but the final use will no longer be possible, and as cable TV companies gradually move their entire service to digital that one won’t last much longer either. I could always get a government-subsidized digital-analog converter box, but for a tiny portable TV that seems kind of silly.

It still works perfectly and I am loathe to simply throw it away (e-waste recycle it, that is). What would you do with it and why?

Comments off

Confessions of a Switcher (part 3)

This is part three of a theoretically infinite series. It’s been roughly five months since I brought home the MacBook Pro and almost that long since my last update to this series. I’ve become incredibly comfortable in the OS X environment and, with a very few exceptions, can do anything I ever did in Windows. [...]

This is part three of a theoretically infinite series.

It’s been roughly five months since I brought home the MacBook Pro and almost that long since my last update to this series. I’ve become incredibly comfortable in the OS X environment and, with a very few exceptions, can do anything I ever did in Windows. In the event I do need Windows, I can use VMWare Fusion to boot Windows XP from a Boot Camp partition with seamless desktop integration. Just today I found a solution to one of the last Windows requirements — syncing my HTC Mogul phone, a Windows Mobile device. Normally one would use ActiveSync to sync a Windows Mobile device, or pay $30 for Missing Sync. I’ve found a free product that does exactly what I need and no more: Eltima Software’s SyncMate. It syncs my contacts and calendars to the Mac’s Address Book and iCal, respectively, and can mount the WinMo file system as an external volume on the Mac for file transfer.

Here’s a current list of third-party software I’m using.

  • Angry IP Scanner — the built-in Network Utility has most of this application’s functionality; I use either or both depending on what exactly I’m trying to do.
  • Book Collector
  • ChronoSync — I haven’t actually started using this yet, but I’ve installed the trial and am checking it out.
  • CrossOver Office — supposed to allow (some) Windows applications to install and run directly in OS X, but I’ve had little success as of yet.
  • Fetch — seems to be the best ftp client for OS X.
  • Google Earth
  • Jolly’s Fast VNC — even in public Alpha, this is the best VNC client I’ve found for OS X, and (apprehensive of using an Alpha) I tried quite a few before this one. Does what it says on the tin.
  • Logitech Harmony Remote software — Web-based programming tool for my Harmony 880 and 670 universal remotes.
  • Movie Collector
  • NetNewsWire — my choice for RSS newsreader. I started with the built-in Mail application, but it couldn’t handle 200+ feeds with any stability; I tried Endo and gave it a couple of months, but eventually gave up on it after one too many crashes and system resource grabs — plus, its UI is a nightmare. NNW does what I want and does it well.
  • OpenOffice.org — the excellent free, open-source alternative to Microsoft Office I’ve been using for years, now in a spiffy new OS X-native version.
  • Opera — if you’ve been reading Project Insomnia for lo, these many years, you know I’ve been an Opera fan for quite a long time. Since switching to Mac I’ve converted almost completely to Safari. I keep Opera around for alternate-browser testing and also use it when I need to have more than one Google Account session open simultaneously, but it’s pretty much fallen off my radar in general.
  • Remote Desktop Connection — the only Microsoft software on my OS X partition is a fine port of the standard RDC client.
  • SketchUp — nifty 3-D sketching tool which I have so far been completely unable to learn. I’d like to use it to model the cabinet wall we want to build in the living room.
  • SplashID — password vault, works with the Mogul to keep all my many and varied passwords safe. Syncing SplashID between the Mac and the Mogul is one of the very few remaining tasks for which I still need Windows; the Mac version doesn’t sync directly but only imports saved files.
  • SyncMate — see above.
  • TextWrangler — this is a terrific text editor that handles code of all kinds, from PHP to HTML to Java.
  • TinkerTool — essentially the OS X equivalent to TweakUI.
  • Transmission — BitTorrent client.
  • VLC Player — for the rare filetype that QuickTime + Flip4Mac can’t handle.
  • VMWare Fusion — see above.

I’m assembling a list of useful tips and tricks, things I’ve learned by trial and error or lucky Googling. That will probably be the subject of part four of this series.

Comments off