Chrome vs Firefox – Memory Usage (Firefox wins)

Posted November 18th, 2011 in Rant, Software by erich

I had given up on Firefox a while back due to crashing issues, as well as because I got tired of manually having to check for updates to the security-hole-filled Flash plugin, and I had moved to Chrome for all my web browsing needs.  Chrome rocks!  It’s looks good, it’s fast, stable (at least in the stable version stream, dev was not so reliable with weird bugs cropping up) and it auto-updates Flash – yay!

Having lived in Chrome land for almost a year now, it’s been good, except for memory usage.  Chrome gobbles up LOTS of memory.  But I made excuses and stuck with it.  It needs more memory because it’s so fast!  When it says waiting for cache it’s really Windows having a problem, not Chrome!  I even upgraded my tired WinXP box from 3G to 4G just to browse the web.  Really.  Okay I have Thunderbird open also, but that’s it!  4 gig of memory just to browse the web…

But hey, you say – I’ve seen how you browse the web and you have WAY TOO MUCH STUFF OPEN!  How much is too much?  Right now, I’ve got 73 tabs open.  Is that a lot?  I don’t think so, and anecdotally, I’ve seen other people have that much open, too.

So I had this nagging suspicion that I should try Firefox again, to see if version 8 is any better than version 4 was when I last used it.  I saved off all my open tabs in Chrome and imported them into FF8.  Fire up the Fox with all those tabs and FF used about 1G of memory.  Quit the Fox and try Chrome with the same exact tabs and windows – Chrome used 2.5G!  Seriously?  Wow.  Double-check and yep both my FF and Chrome have no plugins except for AdBlockPlus and FlashBlock, so they’re basically identical.

I can’t justify the memory usage of Chrome anymore, so I’m back with the Fox.  Time for me to start working on an auto-update checker for Firefox Flash…

Database GUI for Mac OSX

Posted February 16th, 2011 in Java, OSX, Software by erich

Need a basic GUI for playing with databases on OSX?  Version 4.7.2 of Aqua Data Studio is the last version that was free, and can use any JDBC driver as well as it comes bundled with a whole bunch ready to go.  The trick is that it is almost impossible to find it.

Google to the rescue!  Search for ads-java-novm-4.7.2.zip and look for a reputable-looking source, such as a linux or darwin distro site such as this one.  Unzip it and edit datastudio.sh, replacing line 4 with “ADS_HOME=../../..”.  Then use Platypus to make a double-clickable app for it, opening up advanced options and unchecking “Remains running after initial execution” and check “Runs in background” if you want to not have the Platypus app cluttering up your open apps list.

Don’t get me wrong, this is not as good as something like Oracle SQL Developer, but it’s another option to have around.

iPhone FrozenBubble

Posted January 29th, 2009 in iPhone, Software, Usability by erich

My port of FrozenBubble to the iPhone has finally been approved, after about two weeks of waiting.  There were some interesting coding hoops to jump through, as this was a port of a javascript version which already worked in mobile Safari (thanks Glenn Hanson!), and I was converting it to run completely local/embedded in an AppStore application.

Had to hack the javascripts a bit to load everything from the same directory, as the bundle in iPhone apps seems to be flat.  Or it’s flat if you don’t unflatten it, or something.  No biggie.

Mobile Safari likes to have “bouncing” when you scroll past the end of a web page, even a short one, so gotta turn that off.  And gotta turn off the action menu if you hold your finger down.  And a few hacks to get sounds working.  Most of it came from http://www.codingventures.com/?p=31 - thanks fellow iPhone hacker!

Lots of little tweaks to make it feel like a native app, like using the accelerometer for tilt-based aiming.  The animation isn’t the best, due to poor little iPhone’s javascript engine breathing hard, but it’s pretty darn good for what it is.  And fun!

iPhone Invalid Binary Error – Fixed?

Posted January 17th, 2009 in iPhone, OSX, Rant, Software by erich

The dreaded binary error has bitten me…

“The binary you uploaded was invalid. The signature was invalid, or it was not signed with an Apple submission certificate.”

Okay, in one case, it was actually valid, as I had been using an icon file that wasn’t named Icon.png and wasn’t 57×57.  Thanks to Sean for helping me with that.

But today, it was totally bogus.  I made a trivial change for a resubmit of my PrivateWeb app, and the binary was rejected.  Clean the project & rebuild, still hosed.  Restart XCode, still hosed.  Go to the finder and remove every folder from my project’s build directory and then build again – and it WORKED???  WTF?!

Ahem.  I’m glad it worked, but seriously…  There’s something buggy in XCode land.

Oracle with Java – update your JDBC driver now!

Posted December 7th, 2008 in Java, Software by erich

Some quick testing with JMeter showed me that under some serious load on my webapp (100 Tomcat threads, 300 queries a second, some with multi-table joins), the Oracle 11 JDBC driver performs much better than the Oracle 9 JDBC driver, even against a 9i database.  This isn’t a set of benchmarking results, which I know Oracle doesn’t like anyone to talk about, it’s just comparing old vs new Oracle drivers.

The takeaway, go get an updated JDBC driver, now!  Even if you’re running against Oracle 9i or 10g for the database, the new driver will give you a performance boost.  For free!

TowerSmash for the iPhone

Posted October 20th, 2008 in iPhone, Software, Usability by erich

For a hobby project, my brother Alex and I wrote a game for little kids called TowerSmash.  I wanted to write a game, well really more of a toy, that was truly meant for little kids.  So  many “kid games” on the iPhone seem to have little buttons all over the place and levels that load and things you can and can’t touch and scores and bleeps and then boom the game is over.  Um, did we have fun yet?

I wanted something that was open-ended, and that kids could just play with.  What sprang to mind was how all kids seem to endlessly ask grownups to build towers out of wooden blocks so that they can smash them down using cars or their hands or whatnot.  So that’s what we built.  A toy where it’s easy to create towers of blocks and watch them tumble if they’re not balanced, and then easy to throw shiny balls at the blocks to knock them off the table and off the screen.

Get it from the AppStore – $1.99

Wide Finder 2 in Java

Posted June 10th, 2008 in Java, Software by erich

I wanted to give WF2 a decent shot in Java, to see how it compares to the funky OCaml / Scala / Ruby versions that other people were making. It runs pretty well, about 15 minutes, and isn’t that complex. Okay, I did make it a single class file just to be simpler, but OO purists won’t like it :-) It’s a hack, a test, just to see how well it will run.

Notes from my big run with it…

nohup time ~bratton/jdk1.6.0_06/bin/java -d64 -XX:+UseConcMarkSweepGC -Xmx13000m -Xms13000m -cp . egb.MTNIOStats 40 128 /wf1/data/logs/O.all > nohup.30T.128k.out &

real 15:33.9
user 6:02:50.9
sys 8:36.0

Let’s see…

UseConcMarkSweepGC is a good thing. UseParallelGC sounds like it would be good with lots of cores, but it kept killing the VM about 70% through.

I went with a gigantomous heap, just because :-) I don’t really need it all, but as the queues get bigger, it’s nice to have. It probably would run fine with much, much less.

Java6 does much better than Java5. I’m using a locally-installed version since the /usr version wasn’t working. You need to unpack the 32bit sparc9 binaries first, then unpack the 64bit binaries on top of that. Have to use -d64 to get a heap bigger than 3G.

The -server JIT flag didn’t make any difference in processing time for me.

Interestingly, NIO block read size didn’t matter that much from 32k up to 4M, and neither did the number of threads, whether 25, 30, 35, 40, 50, 60, or even 90. Wacky! Not too much overhead in terms of context switching…

My app design has a single thread doing all the IO, simple reads, and then it hands the ByteBuffers to a separate blocking queue for each worker thread, to avoid any lock overhead. I think that’s probably irrelevant now, and that locking would be nanoseconds, so maybe I’ll redesign it, but it works fine.

My biggest problem is that my worker threads are for the most part waiting on IO to get more data to process. And the reduce phase at the end is not very long, 64 seconds, and it’s actually single threaded for now because shrinking 64 seconds to 64/5 seconds isn’t going to drop me from 15 minutes to 7 minutes :-P

And okay, my results are off by .01% or something, but I haven’t re-run since I updated my parser to handle spaces in URLs. Close enough for me, not close enough for some other WF2ers. :-) It all depends on your business domain what your accuracy needs to be.

MTNIOStats.java – file name capitalization may be munged – thanks WordPress! :-(

Apache Derby Data Corruption

Posted November 12th, 2007 in Fubario, Rant, Software by erich

It saddens me to say, but after a year of fiddling with Apache Derby, working around its quirks, making a custom statement cache so that it’s not so frickin’ slow, that it’s finally time to call it quits and move on to something else.

Data corruption… Over the past year, I have been using Derby as an embedded database inside of Fubario. I’ve been running it on Windows2000, WindowsXP, and OSX 10.4. On all of these OSes, some are laptops, some are desktop machines on all the time, I’ve had varied data corruption scenarios occur, even under relatively little load.

I will admit, I haven’t done a good job keeping records of each kind of data corruption, probably because of foolish optimism that when a big point release of Derby came out it would have solved the problems with the prior version. But alas, every release has had various things go wrong. I’ve had entire databases corrupt so that Derby would refuse to startup, or even an interesting “poison table” corruption where everything was fine until I issue a query against a particular table that was corrupt, at which point Derby went out to lunch.

And when I say little load, I mean pretty much the databases were idling 24×7, with maybe a few thousand rows in them. And to think that I switched to Derby specifically to get more reliability than I had been having with hsqldb or its shiny new cousin h2

So where am I now? I’ve built a custom flat-file store for Fubario for storing encrypted backup files. It’s pretty simple, really, with a few key characteristics of secret sauce that make it perfect for Fubario and it’s really tiny in terms of amount of code, because it doesn’t have to do very much at all. I’m also using h2 again for storing maybe tens of properties or something like that, miniscule really, probably could use properties in a flat file, but I’m just reusing the sql-driven classes that had been talking to Derby.

I’m done with the 20 second startup and shutdown times.

I’m done with these random and varied and all peculiar data corruption scenarios.

I’m done with foolish optimism? Maybe.

Fubario Badges

Posted October 8th, 2007 in Fubario, Software by erich

How much you back up isn’t usually an “in your face!” kind of moment, but hey, why not?!

Learn more at fubario.com

Fubario Public Beta

Posted June 29th, 2007 in Software by erich

I’ve got a public beta of Fubario up now. It’s a peer-to-peer backup program where you store your backups on your friends’ computers. Easy to set up, leave it running forever, never think about it.

Things still to do – backing up in-use files and firewall traversal…