From f653e535cd88ddd8b394247c41ac50aee3f6a76c Mon Sep 17 00:00:00 2001 From: Ahir Reddy Date: Wed, 20 Dec 2023 15:26:51 -0800 Subject: [PATCH] fix perf --- sjsonnet/src/sjsonnet/Error.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sjsonnet/src/sjsonnet/Error.scala b/sjsonnet/src/sjsonnet/Error.scala index b915f3ce..2b510af9 100644 --- a/sjsonnet/src/sjsonnet/Error.scala +++ b/sjsonnet/src/sjsonnet/Error.scala @@ -103,8 +103,7 @@ trait EvalErrorScope { def prettyIndex(pos: Position): Option[(Int, Int)] = { importer.read(pos.currentFile).map { s => val Array(line, col) = { - // TODO: Reading in the whole string here is inefficient - new IndexedParserInput(s.readString()).prettyIndex(pos.offset).split(':') + s.getParserInput().prettyIndex(pos.offset).split(':') } (line.toInt, col.toInt) }