”Must have” utility

Java Decompiler Best part is that there is also Eclipse plugin in addition to standalone utility, which seems to also work reasonably well with Eclipse 3.5.1.

Read more

VMWare 2.0.2 stinks big time

Web UI, which barely works at all, no console at all to vmware images, since web UI is so badly broken. So it stinks badly. Oh yeah, and propably plugin wouldn’t work anyway, so who cares. Vmware 1.0.x with its’ own separate management UI/console was few million light years better product. Needless to say, time…

Read more

Oops, I did it again….

Compressed oops in the Hotspot JVM Big Question is why to bother? And the answer is Cache. In other words, using shorter pointers allows fitting more data into processor caches, which improves performance considerably. References: 32-bit or 64-bit JVM? How about a Hybrid? <a href=”http://blog.juma.me.uk/2009/04/03/load-unsigned-and-better-compressed-oops/”>Load unsigned and better Compressed Oops

Read more

Reducing memory usage

Example 31-2. Setting fetch size to turn cursors on and off. PostgreSql, JDBC and large result sets Large ResultSet on postgresql query Is JDBC a big memory hog? Setting some reasonable fetch size might be meaningfull when working with results sets consisting from thousands of elements. Appearent difference is that with default fetch size, all…

Read more

Compact String Dictionary

If system needs to process lots of short strings, which actually quite often are same, then using some dictionary to map strings into compact unique identifiers can improve memory usage and performance quite a bit. [code lang=”java”] package org.kari.test.string; import gnu.trove.TObjectIntHashMap; import java.util.ArrayList; import java.util.List; /** * Dictionary mapping strings int compact identifiers * *…

Read more

Going to DB…

Open Source Database Engines in Java Hmm…. H2? When developing software with Java, why anyone would bother with non-Java DB, i.e. all the problems with native library compatibility and such (32bit/64bit, Linux/Windows/etc., M$XP/M$Vista/M$7/…)? Especially interesting sounds the possibility to embed DB into java process, thus avoiding having separate process and socket (or such) communication with…

Read more

Comments…

every line of code should be commented Easy. 10 lines, no comments. After writing a couple of million lines of code, the more code I write, the more I unwind it. Somewhere along the line, adolescent programmers got the idea that jamming all your logic into as few unreadable lines as possible is the fastest…

Read more

Use only max 8KB IO buffer?!?

When wondering strange performance issues in socket IO, I peeked into native code in input stream, and noticed that logic is following: 1) If buffer is smaller (or equal) to 8KB then use stack 2) If not then malloc() Since memory allocation is not ever free, it sounds possible that such memory allocation can cause…

Read more

String Magic

Trie Update: 20.12.2009 1. Characters vs. Bytes 2. On Character Strings 3. Yooster (from: Text Encoding) Update: 21.12.2009 Busting java.lang.String.intern() Myths How Hotspot Decides to Clear SoftReferences Presenting the Permanent Generation Update: 12.1.2010 Memory usage of Java Strings and string-related objects

Read more