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

Re: [tortoisesvn] r23238 committed - Do not copy CFileTextLines before converting...

From: Simon Large <simon.tortoisesvn_at_gmail.com>
Date: Tue, 28 Aug 2012 21:58:40 +0100

On 28 August 2012 21:53, Oto BREZINA <otik_at_printflow.eu> wrote:
> On 2012-08-28 21:26, Stefan Küng wrote:
>
> On 28.08.2012 21:08, Oto BREZINA wrote:
>
> Is there a very, very good reason why all the already available list
> containers are not good enough?
>
> I'm not sure If get All your "very", but it (altogether) reduced loading
> time by 20% (best old/worse new) or 25%(best/best) - around a second
> tested files
> Tested on CDiffData::Load (where diff takes 35% resp 50%)
>
> I can compare list performances only to get more representative results.
> But IIRC it was almost half of gain.
> Imagine all saved CO2 :)
>
> have you tried calling reserve() on an std:vector first to avoid the
> constant reallocation when loading big files? If not, then please do so
> and check the timings again.
>
> Nor ListOfObject have that info, but I'll try. "my" class starts at 256 and
> double on next need, but that should not make that big difference.
> If only reserve makes that difference Add method can be extended by better
> expand algo.

I think Stefan wants you to try using std:vector with reserve instead
of using your own class, not adding reserve to your class.

> Will check all posibilities later today/tomorrow.
>
>
> Also keep in mind that the line array is used by all views and even in
> multiple threads. And your custom array isn't thread safe.
>
> It is not (multithead safe) - was intended to be simple as fast. In case
> multithread is needed keeping vector makes sense, but I did not found any
> refence to FileTextLines lines other then Load, Patch(methods are not
> called?), ... all seems be one thread related.
> After load(load, convert,diff) lines from FileTextLines are not referenced
> at all. Params are.
> Save uses FileTextLines in its scope as well as Patch methods.
>
> See proof of concept patch(separated Lines and Params) - build it(that's the
> proof), but don't try to run it (it does nothing).
>
> Stefan
>
>
>
> --
> Oto ot(ik) BREZINA - 오토, mob: +421 903 653 470
> Printflow s.r.o, tel +421 2 4488 1086, Bratislava, Slovakia, EU If I toppost
> I do it because:
>
> I don't have time to edit out irrelevant context and signatures
> I expect you to remember the context for my email messages
> I want you do the work to figure out what I said
> My time is more important than your time

Simon

-- 
:       ___
:  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=3001718
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2012-08-28 22:58:44 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.