New Tiled Data Manager ideas and tests

Bart Coppens kde at bartcoppens.be
Mon Jun 1 23:00:09 CEST 2009


On Monday 01 June 2009, Dmitry Kazakov wrote:
> Good evening everyone!
> Today i've commited a draft of KisTiledDataManager. I would be glad if
> someone reviewed and commented it a bit =)
Looks like a great start :-)

3 quick comments:
* I'd love to see some more documentation on the API (not necessarily all 
functions, but I think at least each class could have a small description of 
itself). Adding it earlier ensures that you don't forget it afterwards :-)

* As for the race condition in getTileLazy: I think I prefer having a 
clean-looking relockForWrite function. Although I'm not quite sure that's 
even needed? Can't you just lock m_lock (I don't see any mention of m_RWLock, 
so I assume it it m_lock) at the beginning of getTileLazy, and let the other 
functions recursively lock? (Or do I misunderstand what getTileLazy is 
supposed to do?)

* About the lack of multithreading gain in KisTileProcessor: I'm guessing that 
any increase of gain would depend on the complexity of the action applied to 
the individual tiles. So that while for now it doesn't have any advantage, 
this might be the case later on, when we use this for more complex 
functionality?

Bart


More information about the kimageshop mailing list