Direct Answer
For sessions that flood the terminal with rapid cursor moves, color changes, or formatting codes, the following XTerm settings give the cleanest, fastest rendering while staying true to the XTerm standard:
XTerm*scrollBar: false – removes the vertical scrollbar to cut repaint work.
XTerm*menuBar: false – disables the menu bar, another source of redraw overhead.
XTerm*wrap: false – turns off automatic line‑wrapping, which forces XTerm to recompute line breaks on each CSI.
XTerm*useAlternateScreen: true – keeps the main buffer untouched; the alternate buffer is used for the session, speeding cursor movement and screen clears.
XTerm*allowBold: false – renders bold as regular weight, avoiding font switching on every [1m escape.
XTerm*allowUTF8: true and XTerm*useUnicode: true – enable efficient single‑byte UTF‑8 decoding for the common ANSI codes.
XTerm*disableDoubleBuffering: true – if the build supports it, this reduces full‑screen copy operations during rapid updates.
XTerm*useCjkFont: false – prevents loading large East‑Asian font sets that are not needed for pure ANSI output.
Why These Work
Each tweak eliminates a class of repaint or decoding work that XTerm normally performs when handling many CSI sequences per second. By turning off UI elements, disabling line‑wrapping, and avoiding font changes, the terminal spends less time redrawing and more time simply updating the cursor and character cells.
Implementation Steps
- Open or create
~/.Xresources.
- Add the lines above, one per setting.
- Merge the resource file:
xrdb -merge ~/.Xresources.
- Restart XTerm (or run
xterm -xrm XTerm*debug:true to see debug logs). A smooth cursor and minimal flicker when running a high‑rate test script indicates the settings are effective.
Verification Test
Run a script that emits a burst of CSI codes (e.g., 10,000 per second). In XTerm, observe that the screen stays responsive and the cursor does not stutter. Use xterm -xrm XTerm*debug:true to confirm that repaint events have dropped compared to the default configuration.
Missing Diagnostic Detail
To fine‑tune these recommendations, please let me know which XTerm build you are using (e.g., xterm -V output). Some options, like disableDoubleBuffering, are only available in newer releases.