Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8025515

Performance issues with Source.getLine()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 8
    • 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().

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

              Created:
              Updated:
              Resolved: