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

Re: [PATCH] Keep Selection when refreshing

From: Tobias Schäfer <tobiasschaefer_at_gmx.de>
Date: 2006-04-17 14:32:25 CEST

On Monday 17 April 2006 11:52, Stefan Küng wrote:
> Tobias Schäfer wrote:
> This is very expensive. Imagine a working copy with thousands of files.
> For every file added, you do a lookup in the map.
> Maybe a new boolean which indicates if it's a refresh or the first time
> filling? I haven't checked the code for the Lookup() method, but maybe a
> check if the map is empty first might be faster?

ok, I'm now checking with map.size()!=0 before doing the lookup. That is a
simple comparison with the number of elements in the map. I prefer that than
adding a boolean variable which might get out of sync.

> > +
> > + CMap<CString,LPCTSTR,bool,bool> m_mapFilenameToChecked; ///< Remember
> > manually de-/selected items };
>
> Why do you use the MFC map instead of the std::map here? Is there any
> special reason? In my experience, the std::map is somewhat faster.

No special reason. I've changed it to a std::map.

Thanks for reviewing. Committed in revision 6316

Tobias

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Mon Apr 17 14:32:59 2006

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.