2 Apr 2004 CharlesGoodwin   » (Journeyer)

Another late night, another load of work done.

Speeding up the Ibex core

Tupshin and I got into looking hard at ways to optimise the Ibex core. Currently Ibex does two things very inefficiently and it's amazing that it runs as quickly as it does.

Firstly, it calls repack(), resize(), and resize_children() (the 3 Box.java functions that handle layout) far too often even for trivial things like mouseover. Making these only occur when necessary will speed things up significantly.

The second big inefficiency is that repack() is dumb. (This probably applies to resize() and resize_children() but I've yet to get that far.) A call to repack() repacks a box and it's child boxes regardless of if it is necessary. A box should only be repacked if 1) a child has been added, 2) a child has changed colspan/rowspan, 3) a child has resized, 4) a parent has resized, 5) the cols or rows property has changed, or 6) the box has resized. Even then that can be improved upon significantly.

Once the above two inefficiencies are fixed, Ibex will fly at layout and probably out-perform native applications. That will really piss off the Java-is-slow crowd. (Don't tell them that eventually native binaries through GCJ may well be OpenGL accelerated. Sheesh, they'll have heart attacks.)

The Widgets

The widgets are starting to come together for Ibex. I've done most of scrollbar, and will be testing that wil scrollpane tomorrow. I've encountered a bug or two but nothing that cannot be worked around.

What is good is that this is really road-testing all the widget libs and I'm ironing out any problems and creating more as needed. I love dog-fooding sometimes, it gives you a good sense of progress and satisfaction.

I'm hoping to have a good set of widgets finished up by the end of next week. To do by then: finish scrollbar, slider, spin, and implement combo, option, and text. I'm looking forward to it. Ibex will then be officially usable if still somewhat beta.

Core grid layout

Amazingly Adam also relented on my patches to the core for grid layout behaviour. He claimed they were bad and that his original implementation was right, and that I should reread the Ibex reference. So I did, and ironically my modified core was far closer to the reference than the original implementation. Cool, I just outsmarted a genius. Probably won't happen again!

I posted a proposal to the core mailing list to describe my implementation and how, conceptually, it differs from the reference description of Placing. Drop the word 'cell' from the reference description and the only difference was really on how to deal with boxes with span.

I really want to hack on Box.java some more. It's very satisfying seeing myself make improvements on something written by somebody as clever as Adam and is certainly boosting my ego.

But no point improving on something unused. I have to get the widgets up to scratch and write some documentation and tutorials before working on it some more. And I'll probably have to redo the website. Am I the Ibex lackey or what? :-)

GNOME Office

I've really neglected the GO website that I've been doing. It's getting done but 'oh so' slowly. When I do finish it I'll owe a big apology to Dom, Jody, Rodrigo, and all the other diligent GO hackers.

In more humourous news, Dom gets 1st place for the best April fools joke. I really enjoyed that, which is unusal for an April fool. They mostly so poor and pointless.

The worst April fool award goes to the Exult team. That was awful and just plain not funny. It was probably a private joke.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!