Login | Register
My pages Projects Community openCollabNet

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

Project highlights: :. Download .: :. Support .: :. FAQ .: :. Translations .: :. Donate .: :. Report Bug .:

tortoisesvn
Discussion topic

Back to topic list

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

Author steveking
Full name Stefan Küng
Date 2011-04-27 10:08:40 PDT
Message 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

« Previous message in topic | 12 of 15 | Next message in topic »

Messages

Show all messages in topic

[T-Merge] wrap long lines issues a comments otik Oto BREZINA 2011-04-19 12:20:45 PDT
     Re: [T-Merge] wrap long lines issues a comments steveking Stefan Küng 2011-04-19 13:40:00 PDT
         Re: [T-Merge] wrap long lines issues a comments otik Oto BREZINA 2011-04-23 00:21:34 PDT
             Re: [T-Merge] wrap long lines issues a comments steveking Stefan Küng 2011-04-23 00:23:39 PDT
                 Re: [T-Merge] wrap long lines issues a comments otik Oto BREZINA 2011-04-23 00:40:32 PDT
                     Re: [T-Merge] wrap long lines issues a comments steveking Stefan Küng 2011-04-23 00:47:52 PDT
                         Re: [T-Merge] wrap long lines issues a comments otik Oto BREZINA 2011-04-23 01:05:57 PDT
                             Re: [T-Merge] wrap long lines issues a comments otik Oto BREZINA 2011-04-23 01:29:05 PDT
                             Re: [T-Merge] wrap long lines issues a comments steveking Stefan Küng 2011-04-23 02:44:18 PDT
                                 Re: [T-Merge] wrap long lines issues a comments otik Oto BREZINA 2011-04-23 23:59:22 PDT
                                 Re: [T-Merge] wrap long lines issues a comments otik Oto BREZINA 2011-04-27 00:23:44 PDT
                                     Re: [T-Merge] wrap long lines issues a comments steveking Stefan Küng 2011-04-27 10:08:40 PDT
                                         Re: [T-Merge] wrap long lines issues a comments otik Oto BREZINA 2011-04-27 12:06:47 PDT
                                             Re: [T-Merge] wrap long lines issues a comments steveking Stefan Küng 2011-04-27 12:39:22 PDT
                                                 Re: [T-Merge] wrap long lines issues a comments otik Oto BREZINA 2011-04-27 13:07:18 PDT
Messages per page: