Sunday 8 June, 2008

JDK in its newest release...

This post follows an interesting development at the BOSUG meet this saturday.

I met an employee at Thoughtworks (until then I hadnt heard of the company). Its a software consultancy based company completely based on open source and focussed on quality and performance.

So these guys try out all the newly released versions of open source software and conduct variety of unit tests and several other benchmarks to test out improvements and select the best Open source app for the customers. The discussion this time was regarding JDK 6.

The newest release, in its JIT compiler improvements, produces targetted code compiled to exploit the benefits of the microprocessor architecture of the running machine. Also the adverse effects of reflections (where some common method calls loop over 50 or so times before getting to their destinations) and method call loops seem to have reduced drastically due to better optimizations in the JIT.
The result, as claimed by thoughtworks, is that JDK 6 provides 2.5 times better (faster) performace than version5. Theres more on this performance improvement here, and how best to exploit it here

Some additional info about the performance improvements:
Many deployers in the field, using pre-release versions, have reported noticeable runtime performance improvements, in the "two-digit range" according to Sun, which translates to anywhere from 5% to 24% improvement. Note that this is anecdotal, of course, and depends on what tasks you're performing. However, the JIT has been improved, with better runtime analysis of program characteristics, and the performance improvements have been agreed with by external users.

Desktop support may not be as relevant for the enterprise community, except for rich clients. System tray support, splash screen support, and other elements have been added.

JSE6 now has dynamic language support. It comes pre-delivered with Netscape's Rhino, a Javascript engine, and the scripting project's home page documents many other available scripting languages, including Ruby, Python, awk, Jelly, Pnuts, and Scheme.

Java SE 6 also has new diagnostic capabilities. For example, profilers and debuggers can now attach to a running JVM without specifically using a debugging-capable configuration. For example, if a problem is found at run-time for a production server, a debugger can attach to it without restarting the server, a valuable feature for issues that show up after the server has been running for a long period.


Now, when one talks about performance, the obvious notion is that nothing can get better than targeted assembly code. But thats zero on interoperability, so here's java for that. But somewhere on this transition, the performance suffers partly on effects of interpretation of bytecode and various other overheads. Needless to mention, the JVM on various platforms are not exactly quite consistent in their look and feel, so application starts looking and behaving differently on different machines. Of course for the performance critical (or real time) applications, C/C++ would be the default preference for producing fastest code with some lever of interoperability.

This always has been the belief to the extent that it has been generalized to imply that "any language in its native form gives better performance than one that runs on a virtual machine like jvm". That belief comes now to be questioned as it is claimed (by thoughtworks again) that JRuby runs faster and is better space optimized than native Ruby itself. The explanation is that this is accounted for by the superior JIT compiler optimizations which ensure coherency among objects being accessed together.

Seems like the easier route for developers may not actually tax them on performance anymore. But its just the beginning. I havent really tried out version 6 so far, but user targetted apps with interoperability in mind definitely must go in for it as the best option.


Monday 2 June, 2008

Firefox 3 .. on the way

This post follows my new experience with firefox 3 beta 5.

Im not usually the kind who downloads the latest and greatest to test them out. I generally prefer the stable versions to work with rather than experiment with.

But with fedora 9, I gave it a try.


The features are good.








First Impression:
  • User interface, although mostly similar, has grown better.
  • Web pages layouts (when opened) have become more beautiful: Button styles, text boxes, frames etc and other page elements seem to look slick(er than on earlier versions).
  • The tab edges are squared rather than rounded on previous releases... and this blends well with the gnome desktop.GTK supporters should rejoice.
  • Full screen goes REALLY full screen. So on my 12.1" laptop, i get maximum leverage for viewing web pages. really helpful and cool.
Usability:
  • Much faster (is expected)
  • Few points to prove this: On firefox 2, some of the popular blog posts with a cazillion comments used to take ages to load (the comments would only appear much later). Firefox 3 loads them in a breeze. (not that its too much faster, that depends on ur net connection; but its smoother and not jerky and really pleasing to use :-) )
  • Theres a slight issue in installng adblock. But latest devbuilds here work effortlessly: http://adblockplus.org/devbuilds/
  • Although I dont use too many extensions, some people do and they faced problems getting their extensions to work on beta. But mostly lifehacker solved their problems: http://lifehacker.com/355973/make-your-extensions-work-with-the-firefox-3-beta. Cool for me.. i just stick to the basics without depending on too many extras... keeps me independent of the platform.
  • The auto complete on the address bar makes it more user friendly, in that it provides extra information in the drop down besides just the url. positive to some, negative to some. not a difference to me.
PROBLEMS?
Havent run into any serious problems yet, but yes:
  • VERY VERY SLOW SCROLLING. they like to call it smooth scrolling, but its too annoying to use. rather than improve aesthetics, it removes the users command of the page.
  • Adobe flash plugin installer doesnt install automatically. Manual install necessary. I havent tried other plugins yet, but some others might face similar problems. I installed mine through yum
All in all a pretty cool browser. waiting for the final release...

btw, the firefox community is eyeing at setting a new guiness world record for most downloads in 24 hours, when firefox 3 is released.

http://www.spreadfirefox.com/

Join us in our mission to set a Guinness World Record for the most software downloaded in 24 hours!

Till then, its beta 5. Just hoping that the scroll fix is out soon.