[Kbabel] KBabel 1.2beta2

Gaute Hvoslef Kvalnes gaute at verdsveven.com
Tue Jun 3 15:43:08 CEST 2003


Måndag 2. juni 2003 18:03 skreiv Stanislav Visnovsky:
> Dňa Sobota 31 Máj 2003 14:05 Gaute Hvoslef Kvalnes napísal:
>
> > I'm currently working on very large PO files, and I noticed that saving a
> > file takes much longer time in 1.2b2 than in KBabel 1.0.1. (I haven't
> > tried 1.1, so I can't tell if the slowdown was introduced there as well.)
> >
> > "Very large" means ~27000 strings, 2.8 MiB. KBabel from KDE 2.2.2 was
> > slow and kept crashing (Pentium III 700 MHz, 378 MiB RAM). KBabel 1.0.1
> > was much faster and totally stable, even though this was on a slower
> > computer (Pentium III 450 MHz, 288 MiB RAM). 1.2b2 is about the same as
> > 1.0.1, except that saving this huge file takes almost 10 minutes.
> >
> > Is there any obvious recent change that could have caused this slowdown?
>
> I'm not aware of anything that serious. I'll try  to hunt it down.

As far as I can tell, the save mechanism is totally changed, right? In 1.0.1, 
it looks like it's in kbabel/common/catalog.cpp saveFileAs(), while in 1.2 
it's in kbabel/filters/gettext/gettextexport.cpp GettextExportPlugin::save().

I added some debug output and discovered that 1.2 spends a lot of time going 
through every single message in GettextExportPlugin::save():

  for( uint counter = 0; counter < catalog->numberOfEntries() ; counter++ )
(gettextexport.cpp, approx. line 143)

I don't know the KBabel source well enough to tell if this loop is really 
necessary, but it seems to make saving a lot slower than before. I haven't 
tried enabling autosave, but I imagine it would be unusable when working with 
large files.

KBabel does become responsive again quite soon after the saving has started, 
but I'm not brave enough to continue translating while it's still saving ;-)

Regards,
 Gaute Hvoslef Kvalnes


More information about the kbabel mailing list