public function getTotalSize()
    {
        if (!isset($this->_size)) {
            $size = $this->getSize();
            if (!$this->isLeaf()) {
                foreach ($this->getChildren() as $child) {
                    $size += $child->getTotalSize();
                }
            }
            $this->_size = $size;
        }

        return $this->_size;
    }