Rescan on every open

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
LePrince
Posts: 9
Joined: Tue Aug 25, 2009 2:09 pm

Rescan on every open

Post 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
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post 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.
Best regards,
Igor Siticov.
LePrince
Posts: 9
Joined: Tue Aug 25, 2009 2:09 pm

Post 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
Jean-Paul Brassard
Posts: 65
Joined: Thu May 08, 2008 7:46 pm

Re: Rescan on every open

Post 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)
Jean-Paul Brassard
Quebec, Canada
LePrince
Posts: 9
Joined: Tue Aug 25, 2009 2:09 pm

Post by LePrince »

This sounds promising, would you be willing to share?
Best regards,
Wolfgang
Jean-Paul Brassard
Posts: 65
Joined: Thu May 08, 2008 7:46 pm

Post 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.
Jean-Paul Brassard
Quebec, Canada
Post Reply