My blog has been moved to

Thursday, May 25, 2006

Profiling made fun

One of the loudest complaint directed to KSpread is its inability to cope with large file. Worse, if you try to open large Microsoft Excel file with it, it just hangs there for minutes. Often it also consumes all your memory without mercy.

The solution which I introduced for the KOffice 1.5 was to create directly OpenDocument Spreadsheet file through David's excellent KoXmlWriter, thereby bypassing QDom all together. As you might probably know already, QDom is very inefficient to hold a large XML document. Writing XML directly avoids this QDom's dramatic situation.

The filter is thus improved. But still the Excel import filter is slower than it should be. For the fresh-from-oven KOffice 1.5.1, I included so many little improvements that increase the speed of conversion and reduce the memory usage.

You can also test this yourself by running KoConverter, the underrated conversion tool built into each KOffice:

koconverter report.xls report.ods

That command above will convert report.xls (i.e. your Excel file) to OpenDocument Spreadsheet and save the result to into report.ods. Of course, our Excel filter is still very simple (read: it sucks), but the above trick works for simple Excel documents (and faster than launching

Take for example the test file in bug 85372 (folks, that why it's important to file a bug report!), about 1.4 MB in size. It's hopeless to run koconverter from KOffice 1.4 on this file. You can try it but don't blame me if your computer burns.

With KOffice 1.5, the hope is there. You can have that file converted to OpenDocument in a reasonable time. In my test system (a fairly modern machine), it takes about 13 seconds.

But it could be improved indeed. Install KOffice 1.5.1 and try it again. Now it would only take less than 2 seconds. Nice, isn't it?

Graphically, comparing the speed (shorter is better) is like this:

Bug 85372
(1393 KB)

where the blue bar is for KOffice 1.5.1 and red is for KOffice 1.5.0.

Of course I didn't only test with that particular file but with other large documents as well. Take Flows.xls, which I found via random googling and has 6 MB size. Conversion takes 28 seconds with 1.5.0 but only 4 seconds and with 1.5.1:

(6626 KB)

(The fact that KSpread is still slow when loading the resulting ODS files is another issue which hopefully would be addressed in the upcoming KOffice 2.0).

The key to the boost here is the extensive use of profilers. Right after 1.5 release, I kept myself busy profiling the filter. Armed with Valgrind's Massif and cachegrind and also the excellent Sysprof, it was quite practical to find the bottlenecks though often not so easy to find workarounds. Sure, it's basically a painful and boring job, but if LinuxFormat keeps giving low score to KSpread, then cool shiny Slashdotted hacks won't matter much here, right?

P.S: if your Excel files still crash KSpread, please please file bug report and attach the offending files.

Vertical limit

Someone please fix the ATI driver graphical installer. Yes, it can be solved using command-line option, but still a dropdown list would do the job better than a gazillion radio buttons.

Monday, May 15, 2006

Try KOffice 1.5 with MCNLive Leuven

(Thanks to Anonymous, who gave a notice on my previous post).

Do you want to give KOffice 1.5 a try but don't fancy installing anything? Then use MCNLive, a Mandrive-based Live CD (can also be used as Live USB). The Leuven edition, released three weeks ago, has all KOffice 1.5 applications.

Friday, May 12, 2006

Try KOffice 1.5 with SLAX

SLAX version 5.1.4, which was just released days ago, now has the latest and fresh KOffice 1.5. For those who do not know yet, SLAX is a Slackware-based Live CD. So download and try it if you want to see KOffice 1.5 in action without the need to install anything.

Note that due to space constraint (typical ISO only as large as 200 MB), only KWord, KSpread, and KPresenter are available.

SLAX and KOffice

Thursday, May 11, 2006


After launching Ming, which is Linux-based, expect Motorola to unveil FLSH and GRDN in the near future. These are again such funny names, just like previous Motorola RAZR (my favourite!), ROKR, and SLVR.

But FLSH GRDN is just simply old fashion. My take: why not sponsoring the potential most-discussed movies? Then an interesting set of names may pop up for recent ones, like

Motorola ETHN (and HUNT)
Motorola DVNC, or better (?) RBRT LGDN
Motorola VNDT
Motorola CAPT SPRW
..and so on

Probably also for (too late) names like:

Motorola MILN FLCN
Motorola DRTH VADR (with special edition IMYR FTHR)
Motorola ANKN SKWL
Motorola PADM AMDL
Motorola OBWN KNBI

Any other cool ideas?

Tuesday, May 02, 2006

Accelarated OpenGL-based transition effects for KPresenter

I don't think only Krita may get some OpenGL love. So I started to hack together a couple of transition effects for KPresenter, based on OpenGL:

Later on when I'm finished I'll prepare a patch set for KOffice 1.5, of course if there is demand for it. Otherwise, just wait for 1.6 or 2.0 then.

See you tomorrow in LinuxTag !

Monday, May 01, 2006

Savin' me: Part II

spoiler warning!

Since the first time I liked Nickelback`s Savin' me, I was wondering how the video would be. Yesterday for the first time I saw it on MTV (you can find it also in YouTube) and it was very good. That is a music video.

A guy was almost hit by the bus when making a phone call. But he was saved, pulled from the street by someone. Right after that, he started to see countdown numbers on top of everybody's head. As he experienced soon, this is actually the remaining life's time. He could notice that (surprisingly) he did not have any numbers floating on his head.

In the final part of the video clip, this guy saved a woman who wanted to get in to her car but suddenly the car got crushed seconds after. From that point, the woman now started to see the countdown...