After some code profiling and trace
[Runtime.getRuntime().traceMethodCalls(true); and use of
java_g] we notice in java 1.1.x many object allocation
during a single drawString (mainly String to Vector/char
conversion). Some tests with drawBytes raise problem
under linux (drawBytes don't use the correct font).
Cost of Synchronized Method
In the JDK interpreter, calling a synchronized method is typically 10 times
slower than calling an unsynchronized method. With JIT compilers, this
performance gap has increased to 50-100 time.
Basic Combinator
and Optimization
As basic combinators (Horizontal or Vertical) will
provide the building block of more complex combinators,
we must adopt a good trade-off between efficiency
and maintainability. A rapid analysis of the context
of use shows that vertical display/formatting is
the true problem. Horizontal ineffiency is less
sensitive as from ergonomic point of view a display
should be complient with a standard screen.