Performance Tips
With CodeThatTree you can create trees with almost unlimited items number.
But when a tree has 50+ items it may become slow for some reasons.
To make such a tree faster follow the tips below:
Do not use borders and shadow
These features require additional layers. So it may slow down performance for tree with large items quantity.
Use background with appropriate images instead.
You should create special image and then use it for background by using the constraction like this:
var TreeDef =
{
"style" :
{
"bgimg" : "/img/bg.gif",
}
...
Example - background instead of borders and shadows
You can see an example and complete code here - Background instead of borders and shadows [popup]
Specify the size property for items
Tree avoids additional alignment operations when the size is known.
If all the items have the same size you can specify it once for the whole tree.
Use the constraction like this:
var TreeDef =
{
"style" :
{
"size" : [200, 20]
}
...
Do not use styleover property
This feature requires additional layer.
Example - perfomance
You can see an example for tree with 100+ items here - Performance Example [popup]
Read more about CodeThatTree >>
|