Saturday, February 23, 2008

Firefox Memory Consumption

I started noticing a performance issue with Firefox while filling out forms and opened Task Manager to see this.


Firefox - one window - four tabs (370 MB)

IE - one window - three tabs (20 MB)

Safari (webkit) - zero windows - don't know where those two processes have come from (121MB + 54 MB)


The second javaw.exe process (218 MB) is Eclipse 3.2 with a pretty huge workspace. The eclipse.exe(200MB) is an instance of Eclipse 3.3 with a relatively smaller workspace. Nice to see someone beating Eclipse in memory consumption :).





Thursday, February 14, 2008

RESTful JSON

In a recent project, I used a REST style interface(PHP) and GWT (Google Widget Toolkit). The first thought for a data exchange format was XML. However, on further rumination, the prospect of writing XML node iteration code was daunting. After having done the whole XML node iteration for multiple projects before this, I was feeling too lazy to do it all over again :). Thats when I thought of using JSON (Javascript Object Notation). The JSON programming model is much simpler to use than XML. The ease with which the data can be transformed into objects eliminates all the node iteration code. This is due to the multitude of libraries (including GWT) available for encoding/decoding the JSON format and the ease with which JSON can be converted to objects.  Finally, I ended up with a REST style interface returning JSON encoded data that gets decoded on the client by GWT. 

JSON seems to be a much simpler data exchange format while XML seems to more suited to storage of data. A good combination is probably an XML database (more flexible than an RDBMS) for storage and JSON for data exchange.

  DB Reading BASE: An Acid Alternative: In partitioned databases, trading some consistency for availability can lead to dramatic improvement...