kiranraj
9th March 2007, 06:41
Hi guys,
Iam using Qt4.2's Theads in my application.
I have 2 threads:
1. Gui thread ( QGraphicsView)
2. Worker thread.
In my single threaded application. I have a method called CreateFabrics, which reads information in a data structure each time to create GraphicsItem ( Lot of graphicsItem are created). My application takes a lot of time in this case.
In my Multithreaded application -
Worker thread reads the populated datastructures and creates GraphicItems- ( inherited from QGraphicsItem) but i dont display it( As the doc says: Only main Thread can write to display).
My questions are -
1. Is it ok ,if i create items in other thread.
2. Will there be any performance improvement .If i run this on a multiprocessor machine.
3. How to compare the performance of single thraeded application and multithreaded
app.
Thanks
Iam using Qt4.2's Theads in my application.
I have 2 threads:
1. Gui thread ( QGraphicsView)
2. Worker thread.
In my single threaded application. I have a method called CreateFabrics, which reads information in a data structure each time to create GraphicsItem ( Lot of graphicsItem are created). My application takes a lot of time in this case.
In my Multithreaded application -
Worker thread reads the populated datastructures and creates GraphicItems- ( inherited from QGraphicsItem) but i dont display it( As the doc says: Only main Thread can write to display).
My questions are -
1. Is it ok ,if i create items in other thread.
2. Will there be any performance improvement .If i run this on a multiprocessor machine.
3. How to compare the performance of single thraeded application and multithreaded
app.
Thanks