[Kbabel] KBabel 1.2beta2

Stanislav Visnovsky visnovsky at kde.org
Wed Jun 4 10:33:27 CEST 2003


Dňa Utorok 03 Jún 2003 14:43 Gaute Hvoslef Kvalnes napísal:
> > > 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().

It's the same code moved into a separate plugin. I've checked it out, but 
there seems to be no obvious change :-( It only uses indirect access more and
that could be a problem - especially using QValueList for a huge number of 
entries does not seem to be a good idea (evaluating other solutions...)

>
> 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)

Yes, that's writing each entry of a catalog.

>
> 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 ;-)

Yes, I also wait for saving (but not for autosave).

Stanislav




More information about the kbabel mailing list