[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [TSVN] More on Commit dialog performance

From: SteveKing <steveking_at_gmx.ch>
Date: 2004-12-16 09:42:55 CET

Lübbe Onken wrote:

> Windows Listcontrols get terribly slow when you add a lot of strings to
> them, because their memory managament for strings is crap.

I wouldn't say crap. It's just not optimal ;)

> There are two things (at least in Delphi) that can speed up listcontrols a
> lot.
> 1) Use the listcontrols BeginUpdate before adding strings and EndUpdate
> afterwards. That makes the listcontrol *not* fire all the events associated
> with adding a single entry. If you know you are going to add many strings to
> the listcontrol, do this for 10-20 entries in a batch.

I know that. In MFC, these are called SetRedraw(true/false). The problem
is that in the SVNProgressDlg, I _have_ to update the view after each
entry I add - otherwise you wouldn't see the progress. But I do that
when populating a listcontrol with e.g. the list of modified files in
the commit dialog.

> 2) Use a virtual listcontrol instead that does not handle the strings
> itself.

That wouldn't help much here either.

I did some profiling now (I have the time, since I can't use my new
laptop - it has to be replaced because they sent me the wrong display
type :( ) and found that apart from the redraw and scrolling to the
bottom the resizing of the columns takes a lot of time.
So I changed it so that only for the first 30 entries the columns are
resized automatically. After that, the columns stay the same width, no
matter if some path might be longer than that width. Then, at the end,
the columns are resized again to fit the width of the strings.

I think that's ok - because in 99% of all cases you won't even notice
that the columns don't resize anymore, and even if you do, you can
always resize them yourself while an operation is in progress.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Thu Dec 16 09:44:33 2004

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.