my $id = $self->stash('id');
my $depth = $self->stash('depth');
- warn "jit_tree $id $depth";
my $node_tree = _fetch_node_tree($id, $depth);
my $jit_tree = _transform_node_tree($node_tree, sub {
my ($node) = @_;
$node->{$_} += 0 for (qw(child_count kids_node_count kids_size self_size));
$node->{leaves} = $j->decode(delete $node->{leaves_json});
$node->{attr} = $j->decode(delete $node->{attr_json});
- $node->{name} .= " ->" if $node->{type} == 2 && $node->{name};
+ $node->{name} .= "->" if $node->{type} == 2 && $node->{name};
if ($node->{child_ids}) {
my @child_ids = split /,/, $node->{child_ids};
$dst->{$k} = $src->{$k};
}
}
- else { # ARRAY eg NPattr_PADNAME: {attr}{2}[$val] = $name
+ elsif (ref $src eq 'ARRAY') { # eg NPattr_PADNAME: {attr}{2}[$val] = $name
my $dst = $child->{attr}{$attr_type} ||= [];
my $idx = @$src;
while (--$idx >= 0) {
$dst->[$idx] = $src->[$idx];
}
}
+ else { # assume scalar
+ warn "Node $child->{id} attr $attr_type=$child->{attr}{$attr_type} overwritten by $src\n"
+ if exists $child->{attr}{$attr_type};
+ $child->{attr}{$attr_type} = $src;
+ }
}
$child->{leaves}{$_} += $node->{leaves}{$_}
<h4>
Perl Memory TreeMap
</h4>
- Clicking on a node will show a new TreeMap with the contents of that node.<br /><br />
+ Click on a node to zoom in.<br /><br />
</div>
<a id="back" href="#" class="theme button white">Go to Parent</a>