Performance - drawing a large gizmos.TreeListCtrl faster

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Performance - drawing a large gizmos.TreeListCtrl faster

Alexandre Almosni
Hello,

Using wxPython Phoenix, I have a gizmos.TreeListCtrl with many nodes I'm trying to draw faster. The code is as below:

https://github.com/alex314159/DataFrameToTreeListCtrl/blob/master/DataFrameToTreeListCtrlPhoenix.py

I have a notebook with several tabs, three of which have one of these TreeListCtrl which can expand to 15,000 nodes, each. While the application works flawlessly once it's up and running, the initial drawing takes 7 minutes, which is not very user friendly. Is there a way to make things faster?

My initial thoughts:
*Drawing the tree as the user expands a node - while each tree has 15,000 nodes, users will probably only have 50-100 nodes expanded at one time. How can I do that? Will the panel resize accordingly (scrollbars in particular)
*Failing that, is there a way to keep the application responsive while the trees are being drawn? So users can interact with other tabs in the notebook, and get alerted when the tree is usable?


Thank you very much,

Alex

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Performance - drawing a large gizmos.TreeListCtrl faster

Andrea Gavana
Hi,

On Fri, 9 Nov 2018 at 16.48, Alexandre Almosni <[hidden email]> wrote:
Hello,

Using wxPython Phoenix, I have a gizmos.TreeListCtrl with many nodes I'm trying to draw faster. The code is as below:

https://github.com/alex314159/DataFrameToTreeListCtrl/blob/master/DataFrameToTreeListCtrlPhoenix.py

I have a notebook with several tabs, three of which have one of these TreeListCtrl which can expand to 15,000 nodes, each. While the application works flawlessly once it's up and running, the initial drawing takes 7 minutes, which is not very user friendly. Is there a way to make things faster?

My initial thoughts:
*Drawing the tree as the user expands a node - while each tree has 15,000 nodes, users will probably only have 50-100 nodes expanded at one time. How can I do that? Will the panel resize accordingly (scrollbars in particular)
*Failing that, is there a way to keep the application responsive while the trees are being drawn? So users can interact with other tabs in the notebook, and get alerted when the tree is usable?

I didn’t go through the code, but how many levels do you have in the tree? I.e., are all the 15,000 nodes children of the root?

If that’s not the case, you may want to investigate using “lazy” tree structures, where you add/remove children nodes when their parent is expanded/collapsed.

See, for a few ideas:

Andrea.






Thank you very much,

Alex

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Performance - drawing a large gizmos.TreeListCtrl faster

Alexandre Almosni
Thank you Andrea, let me have a look! I think this is exactly what I’m looking for actually.

On 9 Nov 2018, at 15:58, Andrea Gavana <[hidden email]> wrote:

Hi,

On Fri, 9 Nov 2018 at 16.48, Alexandre Almosni <[hidden email]> wrote:
Hello,

Using wxPython Phoenix, I have a gizmos.TreeListCtrl with many nodes I'm trying to draw faster. The code is as below:

https://github.com/alex314159/DataFrameToTreeListCtrl/blob/master/DataFrameToTreeListCtrlPhoenix.py

I have a notebook with several tabs, three of which have one of these TreeListCtrl which can expand to 15,000 nodes, each. While the application works flawlessly once it's up and running, the initial drawing takes 7 minutes, which is not very user friendly. Is there a way to make things faster?

My initial thoughts:
*Drawing the tree as the user expands a node - while each tree has 15,000 nodes, users will probably only have 50-100 nodes expanded at one time. How can I do that? Will the panel resize accordingly (scrollbars in particular)
*Failing that, is there a way to keep the application responsive while the trees are being drawn? So users can interact with other tabs in the notebook, and get alerted when the tree is usable?

I didn’t go through the code, but how many levels do you have in the tree? I.e., are all the 15,000 nodes children of the root?

If that’s not the case, you may want to investigate using “lazy” tree structures, where you add/remove children nodes when their parent is expanded/collapsed.

See, for a few ideas:

Andrea.






Thank you very much,

Alex

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.