Page 1 of 1

Rescan on every open

Posted: Tue Nov 10, 2009 10:16 am
by LePrince
Hi again, hope you are well!

Where is the procedure which re-scans the form every time it is opened? I want to skip this because it takes about 25 seconds which is more than an average user is willing to wait.

Thanks and best wishes,
Wolfgang

Posted: Thu Nov 12, 2009 8:47 am
by isiticov
Hello,

You can just add components and properties you don't need to be translated to excluded lists and this will reduce the time for scanning.

Posted: Thu Nov 12, 2009 11:40 am
by LePrince
Thanks for the suggestion, Igor.

My situation is that at designtime i do not know what the form will look like and the translation editor is called at runtime. So i do not have the chance of excluding all properties i do not want. Some i know and some i don't.

But i guess there is little we can do about scanning and scanning-times anyway.

Except for one thing:
The function TsiLang.AddString always does a sort. I have nearly 7000 strings in the container and want to add 30 strings (at runtime). Every AddString sorts again and consumes a remarkable amount of time. Multiply with 30 and you will understand that a customer gets angry ... please try to get a solution for this - maybe you can add a flag which indicates whether the stringlist is sorted already. If so, then insert the string at the correct position. This way no sorting is necessary. Just a thought ;-)

Thanks and best wishes,
Wolfgang

Re: Rescan on every open

Posted: Fri Feb 26, 2010 2:39 am
by Jean-Paul Brassard
LePrince wrote:Hi again, hope you are well!

Where is the procedure which re-scans the form every time it is opened? I want to skip this because it takes about 25 seconds which is more than an average user is willing to wait.

Thanks and best wishes,
Wolfgang
Hi,

TsiLang uses Delphi classes to extract translation info, which is a quite slow process... To improve Form loading time, we wrote a dedicated class that directly read SIB files (as text) and extract strings. About 20x faster that Delphi. 8)

Posted: Fri Feb 26, 2010 7:16 am
by LePrince
This sounds promising, would you be willing to share?
Best regards,
Wolfgang

Posted: Fri Feb 26, 2010 2:44 pm
by Jean-Paul Brassard
LePrince wrote:This sounds promising, would you be willing to share?
Best regards,
Wolfgang
Yes, we could share, but first I must tell that our code is dedicted to speed up loading Parent's strings (inheritance problem). We did not (yet) replace the TsiLang initialisation of the Child Form, even we also feel that this part could also be quite faster.

So it may not apply directly to your needs.