Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Multiple entries with intuitively equal keys in PackratReader cache #45

Closed
@tom--k

Description

Even though we use PackratParsers, we've observed exponential parsing time on one of our bit more complicated inputs. It turned out that strange entries get into PackratReader cache; it contained more than one entry for seemingly equal (Parser,Position) pairs.

We've fixed this with a workaround which implements equals method in the OffsetPosition case class so that it does not compare CharSequences. Another working option which seems to be more safe is to compare toString representations of the CharSequences, but that introduces quite significant performance penalty.

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

        AltStyle によって変換されたページ (->オリジナル) /