Loud ramblings of a Software Artisan

Thursday 16 February 2006

More Linux everywhere

The two biggest ISP in France providing broadband internet access via ADSL offers Linux based modem to their customers.

Free with the Freebox, for which I worked a few month, was the first to do that having a two-ended ADSL solution running Linux. Their Freebox modem and set-top box, that provides Internet access, VoIP and TV over DSL, and the DSLAM, the other end, that works over IP and Gigabit Ethernet (fiber optics) unlike what was on the market, at least in 2003, that are ATM based.

Now, France Telecom with the Livebox, provide a DSL Modem/router, with VoIP (yes, a telecom operator that compete with himself with VoIP services), TV (requires an external Ethernet connected decoder), wireless and other gizmos. This box, made by Inventel, runs Linux (the manufacturer advertise it as such).

But last news is more encouraging: Access Linux Platform by PalmSource. PalmSource has been acquired by a Japanse cell-phone company that wanted to go away from Symbian and WinCE with the plan to make PalmOS and Linux the base of their next generation OS. So they announced it. ALP has a Gtk based UI (they don't tell about X11, but apparently it uses X11) and use gstreamer, sqlite on top of a Linux 2.6.12 kernel. I wonder how much intersect with Nokia Maemo, but that would be their interest to team up to create a viable ecosystem of software. Maybe this time we could have AbiWord on PalmOS?

Saturday 4 February 2006

Optimizing AbiWord, part 2

You might want to read part 1 first.

Second round of optimization. I take the same sample document than with part 1, but this time I'll make it displayed. Here is the callee list in KCachegrind:

Obviously there is a list.

  1. UT_GenericVector<fp_Page*>::findItem()
  2. UT_GenericVector<fl_BlockLayout*>::findItem()
  3. UT_UTF8String::UTF8Iterator::sync()

We already know that UT_Vector::findItem() is as fast at it cans. It search linearly the vector. Since it is unordered there is no other choice. I'll skip for item 2 in the list, let's have a look at the use made for it with the callee graph:

We see where it is called from. Looking more closely at the source code you'll see that the vector is used as a queue, a queue of block to put in the spell cheker, and that findItem() is used to locate the element in the vector by index to move it in the queue, or out of the queue. That is where things are wrong. My solution to that is to double-link the fl_BlockLayout together for queueing. That way, when we need to change the queue order for a specific block, we do it really quickly. Change the 2 pointers of the fl_BlockLayout and of the neighbours. It is instant, whatever number of items you have in the list. As for memory it use sizeof(void*) bytes more, but that is actually worth it.

Now let's look at the profiling data after this optimization:

We clearly see that the top time consumer have changed. I mean number 2 is gone. It is hard to provide real data about the speed, but at least I know that it should be. UT_GenericVector<fp_Page*>::findItem() is still number one, it will come next.

Thursday 2 February 2006

AbiWord on BeOS

According to Haiku News, it looks like somebody has built and released AbiWord 2.2.8 for BeOS. The thing is that the code got killed for 2.4.