SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Speed problem with many strings in the Translation editor

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite
View previous topic :: View next topic  
Author Message
BenjyKid



Joined: 05 Apr 2006
Posts: 18

PostPosted: Thu Jun 29, 2006 8:38 am    Post subject: Speed problem with many strings in the Translation editor Reply with quote

Hi,

I have a program that has about 2100 strings in the strings section of the translation editor. Now when I click on strings on the left side in the translation editor it takes very long. While translation editor is loading the strings I notice many repaints as if the translation editor adds one line then does a repaint and then adds the next item and does a another repaint and so on. Could that be optimized?
The temporary workaround is to switch to another program that is running in full screen. Then Windows won't send the paint messages and it is fast. This is also a strong indication that the slow loading comes from lots of unnecessary repaints.

Regards,
Sebastian
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2095

PostPosted: Thu Jun 29, 2006 8:59 am    Post subject: Reply with quote

Could you please send us at support at sicomponents dot com this unit with TsiLang? We will try to fix this ASAP.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2095

PostPosted: Thu Jun 29, 2006 1:56 pm    Post subject: Reply with quote

Thank you for sending files. It is really strange but it works fast and without any problem on our side. May be this is some hardware graphic card or so problem?
Back to top
View user's profile Send private message
BenjyKid



Joined: 05 Apr 2006
Posts: 18

PostPosted: Wed Jul 19, 2006 11:07 am    Post subject: Reply with quote

I've finally found the time to do some more research. In siTransEditor.pas take a look at TsiTransEditFrm.AdjustRowHeight(ARow: Integer); (line 1529).

Code:

    MaxH := DefaultRowHeight; // 17

    //[...] this changes MaxH to 18

    if RowHeights[ARow] <> MaxH then RowHeights[ARow] := MaxH;


DefaultRowHeight is set to 17. But then MaxH will be changed to 18. This means that RowHeights[ARow] will be changed to 18 which means that it will take a lot of time if I have many rows.

I hope this will help you find the problem.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2095

PostPosted: Wed Jul 19, 2006 12:25 pm    Post subject: Reply with quote

In our release sources DefaultRowGeight is set to 18 in DFM. Did you change this manually?
Back to top
View user's profile Send private message
BenjyKid



Joined: 05 Apr 2006
Posts: 18

PostPosted: Wed Jul 19, 2006 1:05 pm    Post subject: Reply with quote

You're correct. In the dfm it is set to 18. But that value basically is ignored because of line 1219 in the source:
Code:
  Grid1.DefaultRowHeight := Canvas.TextHeight('H') + 4;


This evaluates to 17 on my PC. Commenting out that line appears to solve the problem.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2095

PostPosted: Thu Jul 20, 2006 4:17 am    Post subject: Reply with quote

Thank you for details. We've updated this code and hope ti will work fine for you in next version. It is needed for large fonts support.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by p h p B B  © 2001, 2005 p h p B B  Group