Skip to content

Optimize getAppliableFixes #84

Description

@fvictorio

The current implementation is very quadratic but it doesn't need to be. A better algorithm is:

  • Keep an ordered list of already used ranges
  • Add a function that, given a range, uses binary search to return the index where it should be inserted, or null if it overlaps with an existing range.
  • For a given fix, get the insertion indices for all its changes. If one of them has an overlap, don't apply that fix.
  • Add the fix to the list of apliable fixes and all its changes (from last to first) to the list of used ranges.

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