Re: [pyqtgraph] Low performance when simulation has thousands of objects

203 views
Skip to first unread message

Luke Campagnola

unread,
Sep 30, 2014, 4:05:23 PM9/30/14
to pyqt...@googlegroups.com
On Tue, Sep 30, 2014 at 10:05 AM, David Ragazzi <davidr...@gmail.com> wrote:
For network with small architecture, the simulation works very well.. but for big networks, it is terribly slow due to number of 3D objects increase exponentially. For example, if we have a region with 2048 columns wich each column having 32 cells, we will have 65536 objects! I'm using MeshItens to draw spheres (i.e. neurons), and even disabling "smoth" option, operations like zoom are very slow.

The source code:

cellMd = gl.MeshData.sphere(rows=10, cols=10)
cell.tree3d_item = gl.GLMeshItem(meshdata=cellMd, shader='shaded', smooth=False, glOptions='opaque')
cell.tree3d_item.translate(cell.tree3d_x, cell.tree3d_y, cell.tree3d_z)
self.viewer.addItem(cell.tree3d_item)


This said, what you guys suggest to improve performance? Is possible I have a column and its neurons as single object in order to I have better results??

Yes--to speed this up you just need to combine similar objects together. For example, the mesh data for all of your nodes can be concatenated and displayed as a single GLMeshItem. At that point, you should be limited only by the capabilities of your graphics card.

wei zhao

unread,
Apr 19, 2015, 1:14:07 AM4/19/15
to pyqt...@googlegroups.com
Hi, David,

Did you figure it out ? I hit same issue. I am drawing 1000 spheres, but the performance is terrible. thanks.

Wei.

在 2014年10月1日星期三 UTC+8上午8:03:49,David Ragazzi写道:
I mean how multiple spheres are concatenated as a single GLMeshItem?

On 30 September 2014 20:15, David Ragazzi <davidr...@gmail.com> wrote:
Thank you, Luke!

Just a question, would have you some example where meshdata are concatenated as a single GLMeshItem?

--
You received this message because you are subscribed to a topic in the Google Groups "pyqtgraph" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyqtgraph/x5ROUR6MEMY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/CACZXET_9gHKTw-gGt%2BcHPKMC8kkRrogySbFjfhzMpCEbACSLcg%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--
David Ragazzi
MSc in Sofware Engineer (University of Liverpool)
OS Community Commiter at Numenta.org
--
"I think James
Connolly, the Irish revolutionary, is right when he says that the only prophets are those who make their future. So we're not anticipating, we're working for it."



--
David Ragazzi
MSc in Sofware Engineer (University of Liverpool)
OS Community Commiter at Numenta.org
--
"I think James
Connolly, the Irish revolutionary, is right when he says that the only prophets are those who make their future. So we're not anticipating, we're working for it."

wei zhao

unread,
Apr 21, 2015, 3:34:44 AM4/21/15
to pyqt...@googlegroups.com
thanks for your quick response David,

I am using 0.9.10, still bad performance.  I guess I have to give up....

在 2015年4月19日星期日 UTC+8下午8:48:16,David Ragazzi写道:
Unfortutely not, in my case I had to show only the active spheres leaving the visualization of the gray ones as an option which the user can turn on.. :-(


By the way, it seems that PyQtGraph is 0.9.10 now, have you checked whether the performance improved with this version?


For more options, visit https://groups.google.com/d/optout.
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Edmon Silva

unread,
Jan 4, 2017, 4:47:31 AM1/4/17
to pyqtgraph, luke.ca...@gmail.com
Dear Luke,

Could you please show an example how to concatenate multiple spheres as a single GLMeshItem?

Thank you!
Reply all
Reply to author
Forward
0 new messages