Performance issues with Source.getLine()

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: 8
    • Component/s: core-libs
    • None
    • b112
    • generic
    • generic

      Calling Source.getLine() can be very expensive with very large scripts as it iterates through all source characters up to the position.

      We're also using this methods in places where it can be easily avoided because the line number is already available, such as Parser.functionExpression() and CodeGenerator.enterThrowNode().

            Assignee:
            Hannes Wallnoefer
            Reporter:
            Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: