Server side code uses custom code to mark leafs|branches - data generated a lot faster ( about 5x ) than for default sample.
<?php
    
require_once("../config.php");
    
$res= new PDO($mysql_server,$mysql_user,$mysql_pass);
    
mysql_select_db($mysql_db);

function 
child_setter($data){
    
//the check is kind of lame, in real table you most probably may have some more stable way to detect is item have childs or not
    
if ($data->get_value("taskId")%100>1
        
$data->set_kids(false);
    else
        
$data->set_kids(true);
}

   require(
"../../codebase/tree_connector.php");
   
$tree = new TreeConnector($res);
   
$tree->enable_log("temp.log",true);
   
$tree->event->attach("beforeRender","child_setter");
   
$tree->render_table("tasks","taskId","taskName","","parentId");
?>