Improve interpreter performance slightly
This commit is contained in:
parent
cbbcb4fe3e
commit
84ccac0edb
|
@ -18,7 +18,6 @@ public class InteractiveLispInterpreter extends LispInterpreter {
|
|||
|
||||
@Override
|
||||
protected void applyFinishingTouches() {
|
||||
environment.getOutput().println();
|
||||
environment.getOutput().println(environment.decoratePrompt(""));
|
||||
environment.getOutput().flush();
|
||||
}
|
||||
|
|
|
@ -412,7 +412,6 @@ public class LispTerminal {
|
|||
for (int c = outputReader.read(); c != EOF; c = outputReader.read())
|
||||
processOutput((char) c);
|
||||
|
||||
terminal.setCursorVisible(true);
|
||||
terminal.flush();
|
||||
terminal.close();
|
||||
}
|
||||
|
@ -429,9 +428,7 @@ public class LispTerminal {
|
|||
}
|
||||
|
||||
private synchronized void writeSegment() {
|
||||
terminal.setCursorVisible(false);
|
||||
printSegmentCharacters();
|
||||
terminal.setCursorVisible(true);
|
||||
outputSegment = "";
|
||||
redisplayInput();
|
||||
terminal.flush();
|
||||
|
|
|
@ -172,7 +172,7 @@ public class LispInterpreterTest {
|
|||
builder.setInput(createInputStreamFromString("'pickle"), "input");
|
||||
builder.build().interpret();
|
||||
|
||||
assertEquals(format("{0}\n{1}\n{0}\n\n", PROMPT, "PICKLE"), outputStream.toString());
|
||||
assertEquals(format("{0}\n{1}\n{0}\n", PROMPT, "PICKLE"), outputStream.toString());
|
||||
assertEquals("", errorOutputStream.toString());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue