Skip to content

Simplify inefficient tree traversal in generate_data_index.py #96

@vibhatha

Description

@vibhatha

The logic for adding a dataset to the deepest level of the tree (lines 179-190) involves re-navigating the tree from the root (current_nav = tree). This is inefficient and can be simplified. The current variable (or equivalent parent tracking) likely already holds the reference to the correct parent node where the dataset should be appended.

Relevant code:
https://github.com/LDFLK/datasets/blob/main/scripts/generate_data_index.py\#L178-L190

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions