multithreading

BlitzMax Forums/MiniB3D Module/multithreading

Mahan(Posted 2008) [#1]
I'm currently experimenting with MiniB3D on very low-end hardware, the eee 900 netbook (900MHz CPU, intel GMA graphics).

First I wanted to say that I'm very excited that MiniB3D works at this terribad (performance wise) machine and that I could load up a few .b3d models and they showed nicely on the screen.

But I have a problem as soon as I enable the multithreaded build on this machine and I have traced the problem to the garbage collector.

When GC kicks in automatically (every 2 seconds or so) I loose about half a second of frame updates. Even if i build the code in release mode the slowdown of GC is very much noticable.

I managed to minimize the problem through adding GC manually every 10 frames and compiling in releasemode, but its still there.

Does anyone else experiment with MiniB3D and MT in the same project and if so, what is your experience?

(Multithreading would be sweet to have due to network code in my project)


Mark Tiffany(Posted 2008) [#2]
The new threadsafe GC that is used / required by threading is much slower than the pre-existing one. So there is a trade off between whether you are really going to get a lot out of threading versus that performance hit.


Brucey(Posted 2008) [#3]
If you GCCollect often, the garbage collection should be less noticable.