prune(triggerUpdate = true) {
    let pruned = 0;
    for (const nodeName in this._nodes) {
      pruned += this.pruneNode(nodeName);
    }