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

Re: Threading problem in IconOverlay code

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: 2007-06-28 20:48:52 CEST

Tomas Kopal wrote:
> On 28.6.2007 20:04, Stefan Küng wrote:
>> You're right. The reason for those global variables is to reduce disk
>> access. Because of the many overlay handlers (one for each overlay
>> icon), those global objects really improve the performance.
>> One problem however with TLS is that we don't have all 'simple' data
>> types but also complex objects.
>> I think the best way to go here is to use critical sections to guard
>> the global objects.
>> Stefan
> Well, we can create a simple structure holding all these globals and put
> that in the TLS. If these globals has pointers to other types that's ok,
> important is that every thread will have it's own structure with
> variables and pointers. I don't think complex objects are a problem here
> (apart from using more memory as every thread will have it's own copy).
> I think important is to sort the globals by theirs use. Only variables
> used for caching should be in the TLS, the rest is probably fine as
> member variables or protected globals.
> I will try to come up with a patch, but as I am leaving for a week, I
> can't work on that now. If someone is thinking about doing it, feel free
> :-).

That would be great. I'm not so familiar with TLS so I'd really
appreciate a patch for this.
In the meantime, I've committed a fix for this problem in r9915 by using
critical sections.


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Thu Jun 28 20:48:58 2007

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.