Performance Benefits
MonoTerm’s Atomic State system dramatically reduces the amount of data processed for each terminal update.The Big Picture
Copy
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ PERFORMANCE AT A GLANCE │
│ │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ │ │
│ │ │ │
│ │ 99.95% │ │
│ │ ┌─────────────┐ │ │
│ │ │ │ │ │
│ │ │ LESS │ │ │
│ │ │ DATA │ │ │
│ │ │ SENT │ │ │
│ │ │ │ │ │
│ │ └─────────────┘ │ │
│ │ │ │
│ │ When you type, MonoTerm sends 99.95% less data than │ │
│ │ traditional terminals │ │
│ │ │ │
│ │ │ │
│ └───────────────────────────────────────────────────────────────┘ │
│ │
└───────────────────────────────────────────────────────────────────────┘
Data Reduction Visualized
Copy
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ WHEN YOU TYPE ONE CHARACTER │
│ │
│ │
│ BEFORE (Traditional): │
│ │
│ ####################################################################│
│ ####################################################################│
│ ####################################################################│
│ ####################################################################│
│ ####################################################################│
│ │
│ ~50 KB sent │
│ (entire screen data) │
│ │
│ │
│ AFTER (Smart Diff): │
│ │
│ # │
│ │
│ ~0.5 KB sent │
│ (only changed line) │
│ │
│ │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ │ │
│ │ 50 KB ═══════════════════════════════════════════→ 0.5 KB │ │
│ │ │ │
│ │ 100x SMALLER │ │
│ │ │ │
│ └───────────────────────────────────────────────────────────────┘ │
│ │
└───────────────────────────────────────────────────────────────────────┘
What Changes When You Type
Copy
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ TYPING "Hello" IN YOUR TERMINAL │
│ │
│ │
│ Your terminal screen (40 rows): │
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ 1: $ cd my-project │ unchanged │
│ │ 2: $ npm install │ unchanged │
│ │ 3: Done! │ unchanged │
│ │ 4: $ vim file.txt │ unchanged │
│ │ 5: │ unchanged │
│ │ ... │ unchanged │
│ │ 35: │ unchanged │
│ │ 36: │ unchanged │
│ │ 37: │ unchanged │
│ │ 38: │ unchanged │
│ │ 39: $ Hello_ │ <- CHANGED!│
│ │ 40: │ unchanged │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ │
│ Traditional approach: "Send ALL 40 rows every keystroke" │
│ -> 40 rows x 120 cols = 4,800 cells │
│ -> ~50 KB per keystroke │
│ │
│ Smart Diff approach: "Only send row 39 (the changed one)" │
│ -> 1 row x 120 cols = 120 cells │
│ -> ~0.5 KB per keystroke │
│ │
│ │
│ SMART DETECTION │
│ │
│ Only changed rows are detected and sent │
│ │
└───────────────────────────────────────────────────────────────────────┘
Three Modes of Operation
Copy
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ THREE MODES OF OPERATION │
│ │
│ │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ │ │
│ │ MODE 1: FULL │ │
│ │ │ │
│ │ When: Major screen changes (opening vim, running ls) │ │
│ │ │ │
│ │ ┌─────────────────┐ │ │
│ │ │#################│ │ │
│ │ │#################│ All rows sent │ │
│ │ │#################│ Full refresh │ │
│ │ │#################│ │ │
│ │ └─────────────────┘ │ │
│ │ │ │
│ │ Data: ~50 KB │ │
│ │ │ │
│ └───────────────────────────────────────────────────────────────┘ │
│ │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ │ │
│ │ MODE 2: PARTIAL (DiffHint) │ │
│ │ │ │
│ │ When: Small changes (typing, cursor movement) │ │
│ │ │ │
│ │ ┌─────────────────┐ │ │
│ │ │.................│ │ │
│ │ │.................│ Only changed rows │ │
│ │ │#################│ <- this row changed │ │
│ │ │.................│ │ │
│ │ └─────────────────┘ │ │
│ │ │ │
│ │ Data: ~0.5 KB (99% less!) │ │
│ │ │ │
│ └───────────────────────────────────────────────────────────────┘ │
│ │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ │ │
│ │ MODE 3: NONE │ │
│ │ │ │
│ │ When: Only cursor position changed (blinking) │ │
│ │ │ │
│ │ ┌─────────────────┐ │ │
│ │ │.................│ │ │
│ │ │.................│ Nothing sent! │ │
│ │ │.................│ Just cursor update │ │
│ │ │.................│ │ │
│ │ └─────────────────┘ │ │
│ │ │ │
│ │ Data: ~0.1 KB (99.9% less!) │ │
│ │ │ │
│ └───────────────────────────────────────────────────────────────┘ │
│ │
└───────────────────────────────────────────────────────────────────────┘
Real-World Scenarios
Copy
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ HOW MUCH DATA IS SAVED IN DIFFERENT SCENARIOS? │
│ │
│ │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ │ │
│ │ SCENARIO 1: Writing code (typing) │ │
│ │ │ │
│ │ Traditional: #################################### 50 KB │ │
│ │ MonoTerm: # 0.5 KB │ │
│ │ │ │
│ │ Savings: 99% │ │
│ │ │ │
│ │ For 1000 keystrokes: │ │
│ │ Traditional: 50 MB │ │
│ │ MonoTerm: 0.5 MB │ │
│ │ │ │
│ └───────────────────────────────────────────────────────────────┘ │
│ │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ │ │
│ │ SCENARIO 2: Cursor blinking (idle) │ │
│ │ │ │
│ │ Traditional: #################################### 50 KB │ │
│ │ MonoTerm: . 0.1 KB │ │
│ │ │ │
│ │ Savings: 99.9% │ │
│ │ │ │
│ │ For 1 minute of blinking (~60 blinks): │ │
│ │ Traditional: 3 MB │ │
│ │ MonoTerm: 6 KB │ │
│ │ │ │
│ └───────────────────────────────────────────────────────────────┘ │
│ │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ │ │
│ │ SCENARIO 3: Running 'ls' (full screen update) │ │
│ │ │ │
│ │ Traditional: #################################### 50 KB │ │
│ │ MonoTerm: #################################### 50 KB │ │
│ │ │ │
│ │ Savings: 0% (full updates are still full) │ │
│ │ │ │
│ │ BUT: This happens rarely compared to typing! │ │
│ │ │ │
│ └───────────────────────────────────────────────────────────────┘ │
│ │
└───────────────────────────────────────────────────────────────────────┘
Battery and Resource Impact
Copy
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ WHY LESS DATA = BETTER PERFORMANCE │
│ │
│ │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ │ │
│ │ THE CHAIN REACTION │ │
│ │ │ │
│ │ │ │
│ │ Less data sent │ │
│ │ │ │ │
│ │ ▼ │ │
│ │ Less processing needed │ │
│ │ │ │ │
│ │ ▼ │ │
│ │ Less GPU work (fewer pixels to redraw) │ │
│ │ │ │ │
│ │ ▼ │ │
│ │ Less battery used │ │
│ │ │ │ │
│ │ ▼ │ │
│ │ Cooler laptop │ │
│ │ │ │ │
│ │ ▼ │ │
│ │ Longer work sessions │ │
│ │ │ │
│ └───────────────────────────────────────────────────────────────┘ │
│ │
│ │
│ ┌────────────────────────┐ ┌────────────────────────┐ │
│ │ │ │ │ │
│ │ TRADITIONAL │ │ MONOTERM │ │
│ │ │ │ │ │
│ │ Hot laptop │ │ Cool laptop │ │
│ │ Battery drains │ │ Battery lasts │ │
│ │ Fan spinning │ │ Fan quiet │ │
│ │ │ │ │ │
│ └────────────────────────┘ └────────────────────────┘ │
│ │
└───────────────────────────────────────────────────────────────────────┘
Memory Efficiency
Copy
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ MEMORY ALLOCATION COMPARISON │
│ │
│ │
│ Traditional: Creates new memory for EVERY update │
│ ───────────────────────────────────────────────── │
│ │
│ Update 1: [####] allocate │
│ Update 2: [####] allocate [....] garbage │
│ Update 3: [####] allocate [....] garbage [....] garbage │
│ Update 4: [####] allocate [....] garbage [....] garbage [....] g│
│ │
│ │ │
│ Garbage Collector kicks in │
│ │ │
│ PAUSE! │
│ │
│ │
│ MonoTerm: Reuses memory when possible │
│ ───────────────────────────────────────── │
│ │
│ Update 1: [####] allocate (FULL mode) │
│ Update 2: [####] reuse <- same memory │
│ Update 3: [####] reuse <- same memory │
│ Update 4: [####] reuse <- same memory │
│ │
│ │ │
│ No garbage created! │
│ │ │
│ SMOOTH! │
│ │
│ │
│ Result: No GC pauses = smoother experience │
│ │
└───────────────────────────────────────────────────────────────────────┘
Summary Table
Copy
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ PERFORMANCE SUMMARY │
│ │
│ ┌───────────────────┬───────────────────┬───────────────────┐ │
│ │ METRIC │ TRADITIONAL │ MONOTERM │ │
│ ├───────────────────┼───────────────────┼───────────────────┤ │
│ │ │ │ │ │
│ │ Data per │ ~50 KB │ ~0.5 KB │ │
│ │ keystroke │ │ (99% less) │ │
│ ├───────────────────┼───────────────────┼───────────────────┤ │
│ │ │ │ │ │
│ │ Data per cursor │ ~50 KB │ ~0.1 KB │ │
│ │ blink │ │ (99.9% less) │ │
│ ├───────────────────┼───────────────────┼───────────────────┤ │
│ │ │ │ │ │
│ │ Memory │ Every frame │ Full mode only │ │
│ │ allocation │ │ (reused) │ │
│ ├───────────────────┼───────────────────┼───────────────────┤ │
│ │ │ │ │ │
│ │ GC pressure │ HIGH │ ELIMINATED │ │
│ │ │ │ │ │
│ ├───────────────────┼───────────────────┼───────────────────┤ │
│ │ │ │ │ │
│ │ Screen flicker │ POSSIBLE │ ELIMINATED │ │
│ │ │ │ │ │
│ ├───────────────────┼───────────────────┼───────────────────┤ │
│ │ │ │ │ │
│ │ Battery impact │ HIGH │ LOW │ │
│ │ │ │ │ │
│ └───────────────────┴───────────────────┴───────────────────┘ │
│ │
└───────────────────────────────────────────────────────────────────────┘
DiffHint Optimization
The DiffHint system (Full, Partial, None) intelligently selects the minimum data transfer needed for each update, achieving up to 99.95% reduction in data transfer.