[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: Tomas Kopal <Tomas.Kopal_at_altap.cz>
Date: 2007-06-28 20:32:26 CEST

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
:-).

Regards

Tomas

Received on Thu Jun 28 20:34:14 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.