Skip to content

[OPTIMIZATION] make source-ref line extraction faster #325

@nachumg

Description

@nachumg

tl;dr: DirectSourceRef should store the line-number in addition to start_idx and end_idx.

  • Then the line property does not need to look at the source file.

DirectSourceRef._extract_line_info scans the entire file in order to discover a component's line number in its source file.

Profiling shows that peakrdl_html export spends 30% of the time in this method.

For very large models, the peakrdl_html runtime explodes to many hours.

  • Disabling source-links reduces the runtime to a small fraction of that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions