Skip to content

[Refactor] Replace recursive FilterPath.parse with iterative approach #12067

Closed
@cwperks

Description

@cwperks

Describe the bug

This issue is related to a recent pull request: #11060

There is another instance of recursion used in the FilterPath.parse method which appears inefficient and unnecessary. It appears to be ignoring repeat . until the last is located and could more optimally skip until the last . in the sequence instead of recursing.

Additional Context

In #11060, there was a recursive method for evaluating core's own Regex class. The method simpleMatchWithNormalizedString was refactored from a recursive approach to an iterative approach for more predictable space and runtime complexity.

  • Refactor FilterPath.parse to use iterative method
  • Update FilterPathTests to cover more scenarios

Related component

Search

To Reproduce

Should maintain same behavior as now

Expected behavior

Should maintain same behavior as now

Additional Details

No response

Metadata

Metadata

Assignees

Labels

SearchSearch query, autocomplete ...etcbugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions