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.
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
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=3001717
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2012-08-28 22:54:04 CEST