{ "type": "excalidraw", "version": 2, "source": "https://excalidraw.com", "elements": [ {"type": "text", "id": "title", "x": 60, "y": 12, "width": 1080, "height": 44, "text": "How Project Leyden Works — Shift Work Left, Start Right", "fontSize": 27, "fontFamily": 2, "textAlign": "center", "strokeColor": "#1971c2", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "text", "id": "sub", "x": 60, "y": 58, "width": 1080, "height": 22, "text": "Every startup repeats work the JVM has already done. Leyden records it once and reuses it forever.", "fontSize": 13, "fontFamily": 1, "textAlign": "center", "strokeColor": "#555", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "text", "id": "col1h", "x": 60, "y": 90, "width": 310, "height": 28, "text": "① Normal Startup (no cache)", "fontSize": 16, "fontFamily": 2, "textAlign": "center", "strokeColor": "#c92a2a", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "text", "id": "col2h", "x": 415, "y": 90, "width": 310, "height": 28, "text": "② Training Run — mvn verify", "fontSize": 16, "fontFamily": 2, "textAlign": "center", "strokeColor": "#e67700", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "text", "id": "col3h", "x": 775, "y": 90, "width": 320, "height": 28, "text": "③ Production Run (with cache)", "fontSize": 16, "fontFamily": 2, "textAlign": "center", "strokeColor": "#0ca678", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "rectangle", "id": "col1bg", "x": 60, "y": 122, "width": 310, "height": 490, "strokeColor": "#c92a2a", "backgroundColor": "#fff5f5", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 2}, {"type": "rectangle", "id": "col2bg", "x": 415, "y": 122, "width": 310, "height": 490, "strokeColor": "#e67700", "backgroundColor": "#fff9f0", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 2}, {"type": "rectangle", "id": "col3bg", "x": 775, "y": 122, "width": 320, "height": 490, "strokeColor": "#0ca678", "backgroundColor": "#f0fdf8", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 2}, {"type": "text", "id": "c1sub", "x": 70, "y": 128, "width": 290, "height": 20, "text": "Repeats every start. Every pod. Every HPA scale-out.", "fontSize": 10, "fontFamily": 1, "textAlign": "center", "strokeColor": "#c92a2a", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "text", "id": "c2sub", "x": 425, "y": 128, "width": 290, "height": 20, "text": "Runs ONCE during CI/CD (mvn verify). Never in production.", "fontSize": 10, "fontFamily": 1, "textAlign": "center", "strokeColor": "#e67700", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "text", "id": "c3sub", "x": 785, "y": 128, "width": 300, "height": 20, "text": "Every subsequent start. Every pod. Every scale-out.", "fontSize": 10, "fontFamily": 1, "textAlign": "center", "strokeColor": "#0ca678", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "rectangle", "id": "s1a", "x": 78, "y": 154, "width": 276, "height": 48, "strokeColor": "#fa5252", "backgroundColor": "#ffe3e3", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 1}, {"type": "text", "id": "t1a", "x": 83, "y": 161, "width": 266, "height": 35, "text": "Read bytecodes from disk\n~15,000-25,000 class files per Quarkus app", "fontSize": 11, "fontFamily": 1, "textAlign": "center", "strokeColor": "#c92a2a", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "arrow", "id": "a1ab", "x": 216, "y": 202, "width": 0, "height": 20, "points": [[0,0],[0,20]], "strokeColor": "#c92a2a", "roughness": 0, "opacity": 100, "angle": 0, "strokeWidth": 1, "endArrowhead": "arrow"}, {"type": "rectangle", "id": "s1b", "x": 78, "y": 224, "width": 276, "height": 48, "strokeColor": "#fa5252", "backgroundColor": "#ffe3e3", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 1}, {"type": "text", "id": "t1b", "x": 83, "y": 231, "width": 266, "height": 35, "text": "Parse + verify each class\nBytecode validation, constant pool resolution", "fontSize": 11, "fontFamily": 1, "textAlign": "center", "strokeColor": "#c92a2a", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "arrow", "id": "a1bc", "x": 216, "y": 272, "width": 0, "height": 20, "points": [[0,0],[0,20]], "strokeColor": "#c92a2a", "roughness": 0, "opacity": 100, "angle": 0, "strokeWidth": 1, "endArrowhead": "arrow"}, {"type": "rectangle", "id": "s1c", "x": 78, "y": 294, "width": 276, "height": 48, "strokeColor": "#fa5252", "backgroundColor": "#ffe3e3", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 1}, {"type": "text", "id": "t1c", "x": 83, "y": 301, "width": 266, "height": 35, "text": "Load + link classes\nResolve field/method references, lay out memory", "fontSize": 11, "fontFamily": 1, "textAlign": "center", "strokeColor": "#c92a2a", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "arrow", "id": "a1cd", "x": 216, "y": 342, "width": 0, "height": 20, "points": [[0,0],[0,20]], "strokeColor": "#c92a2a", "roughness": 0, "opacity": 100, "angle": 0, "strokeWidth": 1, "endArrowhead": "arrow"}, {"type": "rectangle", "id": "s1d", "x": 78, "y": 364, "width": 276, "height": 48, "strokeColor": "#fa5252", "backgroundColor": "#ffe3e3", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 1}, {"type": "text", "id": "t1d", "x": 83, "y": 371, "width": 266, "height": 35, "text": "JIT interpreter mode\nCount method invocations to find hot paths", "fontSize": 11, "fontFamily": 1, "textAlign": "center", "strokeColor": "#c92a2a", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "arrow", "id": "a1de", "x": 216, "y": 412, "width": 0, "height": 20, "points": [[0,0],[0,20]], "strokeColor": "#c92a2a", "roughness": 0, "opacity": 100, "angle": 0, "strokeWidth": 1, "endArrowhead": "arrow"}, {"type": "rectangle", "id": "s1e", "x": 78, "y": 434, "width": 276, "height": 48, "strokeColor": "#fa5252", "backgroundColor": "#ffe3e3", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 1}, {"type": "text", "id": "t1e", "x": 83, "y": 441, "width": 266, "height": 35, "text": "JIT C1 compile (client)\nQuick native code for warm paths", "fontSize": 11, "fontFamily": 1, "textAlign": "center", "strokeColor": "#c92a2a", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "arrow", "id": "a1ef", "x": 216, "y": 482, "width": 0, "height": 20, "points": [[0,0],[0,20]], "strokeColor": "#c92a2a", "roughness": 0, "opacity": 100, "angle": 0, "strokeWidth": 1, "endArrowhead": "arrow"}, {"type": "rectangle", "id": "s1f", "x": 78, "y": 504, "width": 276, "height": 40, "strokeColor": "#2f9e44", "backgroundColor": "#d3f9d8", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 2}, {"type": "text", "id": "t1f", "x": 83, "y": 516, "width": 266, "height": 22, "text": "✅ FIRST REQUEST served (~350ms)", "fontSize": 12, "fontFamily": 2, "textAlign": "center", "strokeColor": "#2f9e44", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "rectangle", "id": "s1g", "x": 78, "y": 552, "width": 276, "height": 50, "strokeColor": "#c92a2a", "backgroundColor": "#ffdeab", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 1}, {"type": "text", "id": "t1g", "x": 83, "y": 558, "width": 266, "height": 38, "text": "⚠ JIT C2 warmup continues 30-60s\nP99 latency elevated until JIT settles", "fontSize": 11, "fontFamily": 1, "textAlign": "center", "strokeColor": "#c92a2a", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "rectangle", "id": "s2a", "x": 433, "y": 154, "width": 276, "height": 38, "strokeColor": "#e67700", "backgroundColor": "#ffe8cc", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 1}, {"type": "text", "id": "t2a", "x": 438, "y": 163, "width": 266, "height": 22, "text": "mvn verify (CI/CD pipeline)", "fontSize": 12, "fontFamily": 3, "textAlign": "center", "strokeColor": "#e67700", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "arrow", "id": "a2ab", "x": 571, "y": 192, "width": 0, "height": 15, "points": [[0,0],[0,15]], "strokeColor": "#e67700", "roughness": 0, "opacity": 100, "angle": 0, "strokeWidth": 1, "endArrowhead": "arrow"}, {"type": "rectangle", "id": "s2b", "x": 433, "y": 209, "width": 276, "height": 38, "strokeColor": "#e67700", "backgroundColor": "#ffe8cc", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 1}, {"type": "text", "id": "t2b", "x": 438, "y": 218, "width": 266, "height": 22, "text": "Quarkus packages quarkus-run.jar", "fontSize": 12, "fontFamily": 1, "textAlign": "center", "strokeColor": "#e67700", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "arrow", "id": "a2bc", "x": 571, "y": 247, "width": 0, "height": 15, "points": [[0,0],[0,15]], "strokeColor": "#e67700", "roughness": 0, "opacity": 100, "angle": 0, "strokeWidth": 1, "endArrowhead": "arrow"}, {"type": "rectangle", "id": "s2c", "x": 433, "y": 264, "width": 276, "height": 50, "strokeColor": "#e67700", "backgroundColor": "#ffe8cc", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 1}, {"type": "text", "id": "t2c", "x": 438, "y": 270, "width": 266, "height": 38, "text": "Plugin starts packaged app\nwith observation mode active", "fontSize": 12, "fontFamily": 1, "textAlign": "center", "strokeColor": "#e67700", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "arrow", "id": "a2cd", "x": 571, "y": 314, "width": 0, "height": 15, "points": [[0,0],[0,15]], "strokeColor": "#e67700", "roughness": 0, "opacity": 100, "angle": 0, "strokeWidth": 1, "endArrowhead": "arrow"}, {"type": "rectangle", "id": "s2d", "x": 433, "y": 331, "width": 276, "height": 60, "strokeColor": "#1971c2", "backgroundColor": "#dbe4ff", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 2}, {"type": "text", "id": "t2d", "x": 438, "y": 337, "width": 266, "height": 48, "text": "@QuarkusIntegrationTest runs\nHits /startup, /jvm/flags, /q/health\nExercises production code paths", "fontSize": 11, "fontFamily": 1, "textAlign": "center", "strokeColor": "#1971c2", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "arrow", "id": "a2de", "x": 571, "y": 391, "width": 0, "height": 15, "points": [[0,0],[0,15]], "strokeColor": "#e67700", "roughness": 0, "opacity": 100, "angle": 0, "strokeWidth": 1, "endArrowhead": "arrow"}, {"type": "rectangle", "id": "cache-layers", "x": 433, "y": 408, "width": 276, "height": 145, "strokeColor": "#e67700", "backgroundColor": "#fff3cd", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 2}, {"type": "text", "id": "cache-layers-title", "x": 438, "y": 414, "width": 266, "height": 22, "text": "JVM records into app.aot:", "fontSize": 12, "fontFamily": 2, "textAlign": "center", "strokeColor": "#e67700", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "rectangle", "id": "layer1", "x": 443, "y": 438, "width": 256, "height": 24, "strokeColor": "#1971c2", "backgroundColor": "#d0ebff", "fillStyle": "solid", "roughness": 0, "opacity": 100, "angle": 0, "strokeWidth": 1}, {"type": "text", "id": "l1t", "x": 448, "y": 443, "width": 246, "height": 14, "text": "Layer 1: Parsed class bytes (base CDS — JDK 12+)", "fontSize": 10, "fontFamily": 1, "textAlign": "left", "strokeColor": "#1971c2", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "rectangle", "id": "layer2", "x": 443, "y": 465, "width": 256, "height": 24, "strokeColor": "#0ca678", "backgroundColor": "#c3fae8", "fillStyle": "solid", "roughness": 0, "opacity": 100, "angle": 0, "strokeWidth": 1}, {"type": "text", "id": "l2t", "x": 448, "y": 470, "width": 246, "height": 14, "text": "Layer 2: Loaded + linked state (JEP 483 — JDK 24+)", "fontSize": 10, "fontFamily": 1, "textAlign": "left", "strokeColor": "#0ca678", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "rectangle", "id": "layer3", "x": 443, "y": 492, "width": 256, "height": 24, "strokeColor": "#2f9e44", "backgroundColor": "#d3f9d8", "fillStyle": "solid", "roughness": 0, "opacity": 100, "angle": 0, "strokeWidth": 1}, {"type": "text", "id": "l3t", "x": 448, "y": 497, "width": 246, "height": 14, "text": "Layer 3: JIT method profiles (JEP 515 — JDK 25+)", "fontSize": 10, "fontFamily": 1, "textAlign": "left", "strokeColor": "#2f9e44", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "text", "id": "cache-size-note", "x": 438, "y": 522, "width": 266, "height": 28, "text": "Output: target/quarkus-app/app.aot\nTypically 50-150 MB per app", "fontSize": 10, "fontFamily": 1, "textAlign": "center", "strokeColor": "#555", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "text", "id": "training-quality", "x": 433, "y": 558, "width": 276, "height": 52, "text": "Better tests = better cache\nMore endpoints exercised → more\nclasses linked + hot paths profiled", "fontSize": 11, "fontFamily": 1, "textAlign": "center", "strokeColor": "#1971c2", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "rectangle", "id": "s3a", "x": 793, "y": 154, "width": 286, "height": 38, "strokeColor": "#0ca678", "backgroundColor": "#c3fae8", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 1}, {"type": "text", "id": "t3a", "x": 798, "y": 163, "width": 276, "height": 22, "text": "JVM starts + detects app.aot alongside JAR", "fontSize": 11, "fontFamily": 1, "textAlign": "center", "strokeColor": "#0ca678", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "arrow", "id": "a3ab", "x": 936, "y": 192, "width": 0, "height": 15, "points": [[0,0],[0,15]], "strokeColor": "#0ca678", "roughness": 0, "opacity": 100, "angle": 0, "strokeWidth": 1, "endArrowhead": "arrow"}, {"type": "rectangle", "id": "s3b", "x": 793, "y": 209, "width": 286, "height": 38, "strokeColor": "#0ca678", "backgroundColor": "#c3fae8", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 1}, {"type": "text", "id": "t3b", "x": 798, "y": 218, "width": 276, "height": 22, "text": "Memory-maps app.aot (fast, shared read-only)", "fontSize": 11, "fontFamily": 1, "textAlign": "center", "strokeColor": "#0ca678", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "arrow", "id": "a3bc", "x": 936, "y": 247, "width": 0, "height": 15, "points": [[0,0],[0,15]], "strokeColor": "#0ca678", "roughness": 0, "opacity": 100, "angle": 0, "strokeWidth": 1, "endArrowhead": "arrow"}, {"type": "rectangle", "id": "skip-box", "x": 793, "y": 264, "width": 286, "height": 130, "strokeColor": "#0ca678", "backgroundColor": "#e6fcf5", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 2}, {"type": "text", "id": "skip-title", "x": 798, "y": 270, "width": 276, "height": 22, "text": "Work SKIPPED on this startup:", "fontSize": 12, "fontFamily": 2, "textAlign": "center", "strokeColor": "#0ca678", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "text", "id": "skip1", "x": 803, "y": 295, "width": 271, "height": 95, "text": "⏭ Parse + verify (15k-25k classes)\n⏭ Load + link (resolve all references)\n⏭ JIT interpreter warmup phase\n⏭ C1 profiling pass\n→ Hot methods compiled immediately", "fontSize": 11, "fontFamily": 1, "textAlign": "left", "strokeColor": "#0ca678", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "arrow", "id": "a3cd", "x": 936, "y": 394, "width": 0, "height": 20, "points": [[0,0],[0,20]], "strokeColor": "#0ca678", "roughness": 0, "opacity": 100, "angle": 0, "strokeWidth": 1, "endArrowhead": "arrow"}, {"type": "rectangle", "id": "s3e", "x": 793, "y": 416, "width": 286, "height": 48, "strokeColor": "#2f9e44", "backgroundColor": "#d3f9d8", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 3}, {"type": "text", "id": "t3e", "x": 798, "y": 428, "width": 276, "height": 26, "text": "✅ FIRST REQUEST served (~175ms)", "fontSize": 13, "fontFamily": 2, "textAlign": "center", "strokeColor": "#2f9e44", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "rectangle", "id": "s3f", "x": 793, "y": 472, "width": 286, "height": 48, "strokeColor": "#0ca678", "backgroundColor": "#c3fae8", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 1}, {"type": "text", "id": "t3f", "x": 798, "y": 480, "width": 276, "height": 35, "text": "✅ JIT C2 already active\nP99 latency good from request #1", "fontSize": 11, "fontFamily": 1, "textAlign": "center", "strokeColor": "#0ca678", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "rectangle", "id": "cache-reuse-note", "x": 793, "y": 528, "width": 286, "height": 80, "strokeColor": "#1971c2", "backgroundColor": "#dbe4ff", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 1}, {"type": "text", "id": "cache-reuse-txt", "x": 798, "y": 535, "width": 276, "height": 68, "text": "Cache is shared across pods:\nMultiple containers on the same node\nread the same memory-mapped file.\nSelf-invalidating: JVM detects\nchanged JARs and rebuilds.", "fontSize": 11, "fontFamily": 1, "textAlign": "center", "strokeColor": "#1971c2", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "arrow", "id": "col2to3", "x": 709, "y": 460, "width": 65, "height": 0, "points": [[0,0],[65,0]], "strokeColor": "#0ca678", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0, "strokeWidth": 3, "endArrowhead": "arrow"}, {"type": "text", "id": "col2to3lbl", "x": 710, "y": 442, "width": 64, "height": 18, "text": "app.aot", "fontSize": 11, "fontFamily": 3, "textAlign": "center", "strokeColor": "#0ca678", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "rectangle", "id": "quarkus-note", "x": 415, "y": 620, "width": 310, "height": 34, "strokeColor": "#862e9c", "backgroundColor": "#f8f0fc", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 1}, {"type": "text", "id": "quarkus-note-txt", "x": 420, "y": 629, "width": 300, "height": 18, "text": "Quarkus activates -XX:AOTCache=app.aot automatically at runtime", "fontSize": 11, "fontFamily": 2, "textAlign": "center", "strokeColor": "#862e9c", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "rectangle", "id": "summary-bar", "x": 60, "y": 622, "width": 350, "height": 34, "strokeColor": "#c92a2a", "backgroundColor": "#fff5f5", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 1}, {"type": "text", "id": "summary-bar-txt", "x": 65, "y": 631, "width": 340, "height": 18, "text": "This work repeats on EVERY pod start, EVERY HPA scale-out", "fontSize": 11, "fontFamily": 2, "textAlign": "center", "strokeColor": "#c92a2a", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "rectangle", "id": "summary-bar2", "x": 775, "y": 622, "width": 320, "height": 34, "strokeColor": "#0ca678", "backgroundColor": "#e6fcf5", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 1}, {"type": "text", "id": "summary-bar2-txt", "x": 780, "y": 631, "width": 310, "height": 18, "text": "Skipped on every pod. Every HPA scale-out. Free.", "fontSize": 11, "fontFamily": 2, "textAlign": "center", "strokeColor": "#0ca678", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0} ], "appState": { "gridSize": null, "viewBackgroundColor": "#ffffff" } }