My Little Corner of the Net

Improving Eclipse Performance in OS X

I use various flavors of the Eclipse IDE for almost all of my programming these days, so when I got my new MacBook Pro laptop it was one of the first things that I installed.

And what a disappointment that was. While I’m used to Java apps being slow, since getting Core 2 Duo Windows machines at work and home I’ve come to expect Eclipse to be fairly snappy. Since the Mac has twice the RAM of the other machines I expected the same, or better, performance from it. The first time I started Eclipse on the Mac it took nearly two minutes to load! Once it loaded it was fine, but the two minute load was something that I though I gave up when I moved off of my old Gateway P4/512Mb laptop.

I did a couple of Google searches and found others complaining about the slowness of Eclipse on their Mac, but no solutions. Then I remembered having to tweak some settings to improve performance on that old Gateway. I figured the same might be in order for the Mac, and I was right.

If you’re frustrated with the slowness of Eclipse on the Mac, try this:

  1. Find your Eclipse.app file (probably just labeled “Eclipse” and showing the familiar purple globe icon), Control-Click on it, and choose “Show Package Contents” from the context menu.
  2. Open up the Contents/MacOS/eclipse.ini file in a text Editor such as TextEdit
  3. Find the line “-Xmx256m” and change it to “-Xmx512m.” This increases the maximum memory that the Java VM will allow Eclipse to consume.
  4. Save and close the ini file and close the Eclipse finder window
  5. Double click on the Eclipse.app icon and watch Eclipse load much faster!

Upping the memory to 512Mb is now giving me comparable results to those of my Windows PCs. If you have the memory available, upping it even higher may give you even better performance, but I haven’t tried yet.

I Can Has Macintosh

MacBook Pro 17"After more than eight years of wanting a Mac for my office I finally got one last week. And what a nice one it is…a 17″ MacBook Pro laptop with a 2.5Ghz Intel Core 2 Duo processor, 4Gb of RAM, and a 250Gb hard drive. This thing flies, and the display quality is absolutely amazing.

Apple seems to have thought of everything, too. The keyboard lights and the screen dims to adjust to the ambient lighting around you. The touch pad lets you easily scroll when you touch with two fingers, and rotate and resize images with a pinching action. The only thing that I miss are my Page Up, Page Down, Home, and End keys which are absent from the MacBook keyboard. Command-Arrow does about the same thing, but it is less convenient, especially when I’m used to hitting Home and End all the time as I write code.

Since my job often requires me to make things that are cross-platform or at least to test things on both platforms, having access to a Mac is rather important. Until now, any time I needed to use a Mac I had to go upstairs to our lab and work there. Since working this way is incredibly inconvenient and distracting, I tended to work on the Windows side of things and only test on Mac when I absolutely needed to, which sometimes led me to find problems that could have been fixed much more easily if I had tested on the Mac side a lot sooner. Now I’ll be much better able to develop both platforms in parallel and hopefully improve my quality at the same time.

I was originally going to order the 15.4″ display, but my boss suggested going for the 17″ for the extra screen real estate. I wasn’t about to argue with that, though I worried that a 17″ laptop was bordering on not being portable. Boy was I wrong, though–the thing is so slim and light that it is hardly a chore to take it home with me.

So far I like the Mac. As my buddy Jason says, it’s “usable Unix.” I’ve never particularly cared for the Windows environment but used it because a) it was better than the old pre-X Mac OS versions and b) that’s where the software for developers was. Now most of the software I use is available on both platforms and the OS is a huge improvement. I hesitate to say it, but I could quite possibly become a convert. And since I can can virtualize Windows so easily on the Mac, I can have the best of both worlds on a single laptop.

I haven’t done too much yet with the Mac. I’ve been busy with a few things at work lately and, since I am trying to roll out the new Tay House site by the beginning of the scouting year, I’ve had little free time I home, either. So mostly I’ve been editing the site using our CMS’s browser-based tools and looking for tools to replace my most oft-used web development tools (such as Cyberduck in place of WinSCP). Of course, I’ve played with some of the cool software that comes with the Mac, too, like the DVD player and Front Row (full screen video is awesome on this thing).

I’ve also installed Virtual Box, an open source virtual machine container from Sun, and a virtual install of Windows Vista. While it works, VirtualBox doesn’t always hide the Mac mouse pointer when I’m “locked” into windows, so I end up with with two pointers–in different places–which is extremely confusing. I’m planning to ask for a license of VMWare, so that I can virtualize without confusion, sometime soon.

My only other complaint so far is with Office. Office 2008 is nothing like Office 2007 and things that I can do easily with office on Windows aren’t quite as fluid on the Mac. I guess that’s what you get when you let Microsoft design software for the Mac, though.

Overall, I love the Mac and can’t wait to be able to get more use out of it.

Chainable YUI?

Yahoo! released a preview of the Yahoo User Interface library version 3.0 yesterday. While I haven’t yet delved into the new package myself, it looks as though the new YUI will follow on the footsteps on other JavaScript packages like jQuery instead of following its own namespaced model. The preview code in the announcement on the YUI blog shows heavy use of YUI() and Y objects instead of the bulky YAHOO.whatever.whatever naming convention in use now and jQuery-esque selectors. It also says that the YUI team has “paid attention throughout the new architecture to the return values of methods and constructors” to allow developers to use chaining syntax in their code.

I have always preferred the maturity, robustness, and consistency of the YUI library, but the long naming conventions and poor selector support has often lead me to other packages for simple jobs. While the new YUI will be backwards incompatible with current code it looks as though the YUI team is taking a step in the right direction. I’ll definitely be watching as this new version develops.

Thank You Dreamweaver, But You Don’t Have to Tell Me

A stupid error message I just experienced in Dreamweaver:

Adobe Dreamweaver CS3: No Error Has Occured

Lakers Miss Flight to Boston

Evidently the L.A. Lakers missed their flight to Boston the other day because they simply weren’t there for game six last night…final score 131-92! The Celtics site is now referring to the game as the “Boston Masacre.”

Congratulations Celtics…I had been waiting since I was nine years old for last night.

<