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

Re: [T-Merge] wrap long lines issues a comments

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Wed, 27 Apr 2011 19:08:30 +0200

On 27.04.2011 09:23, Oto BREZINA wrote:
>
>
> On 2011-04-23 11:44, Stefan Küng wrote:
>> On 23.04.2011 10:05, Oto BREZINA wrote:
>> Right. I remember that I was thinking of using just one vector instead
>> of three. But I don't remember why I didn't do it.
>> I've done some testing and it seems the three vectors really are
>> identical in all situations I tested.
>> So I'd say if you want, you can try and use a global vector instead of
>> three.
> Here is patch however it does not work. When you start T-Merge it works
> nice, as soon as you change wrap lines there is no data displayed ?

Some comments:
* why a new class for a lock? We already have a very good locking class
which we use: CReaderWriterLock and the convenience classes
CAutoReadLock, CAutoWriteLock, CAutoReadWeakLock and CAutoWriteWeakLock.
* why even a lock? TMerge doesn't use multiple threads so locking
shouldn't be necessary at all. If you want to block something, don't
name it lock but e.g., 'block'.
* why the lock class and then a separate int variable in CBaseView with
which you do the locking?
* you've added methods like AddBuildLock(), but that one is never used.
So how does your locking work?
* don't call it 'build lock' - it isn't for building the project so the
name doesn't seem correct. I think you want the lock for building the
screen vector? Name it 'screenvecblock' or something like that.

I'm not sure what you want to achieve with this 'lock', but I think it
isn't really for locking. I think you want to prevent rebuilding the
screen vector for every view if it was already build by another view. In
that case, you're actually using some counting mechanism, but not a
lock. Problem is: you can't just 'count to three' for the views because
not every view needs to rebuild the vector and not all views are visible
all the time.

Rebuilding the vector is also done as a response for some window
messages (like WM_SIZE). In that situation, you can't assume that all
views will rebuild the vector and can't use counting. And you can't
block the rebuilding for the same view after it was just built, because
the WM_SIZE message could arrive twice for one view and then for another
view, or just twice for one single view and never for another. That
means you won't gain any performance in that situation - at least I
can't think of a reliable way...

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2725220
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-04-27 19:08:41 CEST

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.