Skip to content

Speed up dendrogram layout computation #248

@andremrsantos

Description

@andremrsantos

Hi,

I've recently been working with the package for plotting some tree and dendrogram data, but some of my trees are quite large, and computing their layout is becoming costly.

Reviewing the code, I notice the following line of code used to compute the nodes' position.

full_lengths <- distances(graph, to = node_is_root(), weights = length)

I was wondering if you couldn't include the parameter mode = "in" to avoid the algorithm transverse the whole tree and reduce computing time? I did a quick test and it improved the execution time for my local function.

Thanks for everything and a great project 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions