etetoolkit / ete

Python package for building, comparing, annotating, manipulating and visualising trees. It provides a comprehensive API and a collection of command line tools, including utilities to work with the NCBI taxonomy tree.
http://etetoolkit.org
GNU General Public License v3.0
773 stars 216 forks source link

Slow rending in circular layout with low collapse #665

Open dengzq1234 opened 1 year ago

dengzq1234 commented 1 year ago

When I compared circular layout with rectangular layout with low collapse level(1, for example), I noticed the circular tree has more delay than the rectangular, which caused very obvious "laggy" feeling. Here you can see the pending time in circular mode sometimes can arrive > 5s comapring to rectangular tree, which contains no layout.

Screenshot from 2023-01-23 12-52-23 Screenshot from 2023-01-23 12-45-02

Here I provide tree and the script

progenome3_annotated.nw.zip

scirpt that I executed

from ete4 import Tree

TREEFILE = './progenome3_annotated.nw.txt'

popup_prop_keys = ['name', 'dist', 'support', 'rank', 'sci_name', 
                    'taxid', 'lineage', 'named_lineage', 
                    'aquatic_habitat', 'host_associated',  
                    'soil_habitat', 'GC']

t = Tree(TREEFILE, format=1)
level = 2 
layouts = [

]

t.explore(tree_name='example',layouts=layouts, \
            popup_prop_keys=popup_prop_keys)