[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: Oto BREZINA <otik_at_printflow.eu>
Date: Tue, 28 Aug 2012 21:08:16 +0200

On 2012-08-28 17:14, Stefan Küng wrote:
> On Tue, Aug 28, 2012 at 2:35 PM, <tortoisesvn_at_googlecode.com> wrote:
>> Revision: 23238
>> Author: htcotik
>> Date: Tue Aug 28 05:34:42 2012
>> Log: Do not copy CFileTextLines before converting
>> Use home made list for text lines
>> Reduce array management using only one array with struct
>> http://code.google.com/p/tortoisesvn/source/detail?r=23238
>>
>> Added:
>> /trunk/src/Utils/ListOfObjects.h
> 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 :)

It started as comparison between *ptr, vs ptr[i], but even ptr[i] gives
a way faster result.
In comparison delete of list. Starting T-Merge takes about 7-8 sec,
closing more then 20.
No progress on this matter unfortunately.

Site note:
T-merge loads file converting it to UTF16.
Then file buffer is slitted into lines. And removed after that.
I added RemoveAll on and of load because I did not found how long those
lines was alive - even they represent shared data at load stage, on
editing data is duplicated, and was kept ...
File lines are copied into diff data, line nums are added.
When save is performed, diff data are copied to FileLines and saved.

I have two (disjunctive) ideas how to improve this data flow.

A. Diff data would have only index to filelines - in fact that index is
same as line number ...
All editing can be performed on file.
This will however increase cache missed as data will be more spread.
However I don't understand some code about patches and conflicts. This
may be stopper.

B. convert file to UTF16 as is - instead of using CString use other
class holding pointer to original buffer, and length. On EDIT CString
will be created.

But thinking about ... it is seems only good on it is that are main !? :o

> I really hate introducing yet another
> buffer/container/list/vector/whatever which only adds to maintenance.
Me usually too. Can be undo as one line change in typedef.
>
> If it's possible, please use std::list, std::vector or something that
> already exists.
It was used (std::vector), but its usage is heavy, so all balast in it
makes difference (on BIG files).
>
> Stefan
>

-- 
Oto ot(ik) BREZINA - 오토
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=3001695
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2012-08-28 21:08:31 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.