[{"data":1,"prerenderedAt":256},["ShallowReactive",2],{"content-/blog/streaming-optimization":3,"related-blog":231},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"keywords":10,"author":11,"date":12,"category":13,"image":14,"body":15,"_type":225,"_id":226,"_source":227,"_file":228,"_stem":229,"_extension":230},"/blog/streaming-optimization","blog",false,"","流式优化策略","优化流式输出的性能，减少延迟，提高吞吐量","流式优化策略, Blog, HTMLPAGE","HTMLPAGE","2025-11-26","待分类","/content-images/blog/blog.jpg",{"type":16,"children":17,"toc":216},"root",[18,26,32,42,47,55,60,68,72,77,113,116,121,143,149,177,182,208,211],{"type":19,"tag":20,"props":21,"children":22},"element","p",{},[23],{"type":24,"value":25},"text","流式优化关注端到端延迟与带宽效率。本文列出缓冲、合并与前端消费优化建议，并补充实践清单。",{"type":19,"tag":27,"props":28,"children":30},"h3",{"id":29},"缓冲与合并",[31],{"type":24,"value":29},{"type":19,"tag":33,"props":34,"children":35},"ul",{},[36],{"type":19,"tag":37,"props":38,"children":39},"li",{},[40],{"type":24,"value":41},"服务端可在短时间窗口内合并小消息以减少包开销，但要设置最大等待时间以避免显著增加感知延迟。",{"type":19,"tag":27,"props":43,"children":45},{"id":44},"前端解析与渲染",[46],{"type":24,"value":44},{"type":19,"tag":33,"props":48,"children":49},{},[50],{"type":19,"tag":37,"props":51,"children":52},{},[53],{"type":24,"value":54},"使用增量解析器与增量渲染减少首次可视时间；在部分数据不可用时显示轻量占位并逐步填充。",{"type":19,"tag":27,"props":56,"children":58},{"id":57},"后退与一致性策略",[59],{"type":24,"value":57},{"type":19,"tag":33,"props":61,"children":62},{},[63],{"type":19,"tag":37,"props":64,"children":65},{},[66],{"type":24,"value":67},"在网络或下游不可用时提供快速降级（例如仅返回文本或占位图片），并记录事件以便恢复后补偿。",{"type":19,"tag":69,"props":70,"children":71},"hr",{},[],{"type":19,"tag":20,"props":73,"children":74},{},[75],{"type":24,"value":76},"上线检查清单：",{"type":19,"tag":33,"props":78,"children":81},{"className":79},[80],"contains-task-list",[82,95,104],{"type":19,"tag":37,"props":83,"children":86},{"className":84},[85],"task-list-item",[87,93],{"type":19,"tag":88,"props":89,"children":92},"input",{"disabled":90,"type":91},true,"checkbox",[],{"type":24,"value":94}," 合并窗口与最大等待时间已被设定并经过性能测试",{"type":19,"tag":37,"props":96,"children":98},{"className":97},[85],[99,102],{"type":19,"tag":88,"props":100,"children":101},{"disabled":90,"type":91},[],{"type":24,"value":103}," 前端能安全处理乱序与重复数据",{"type":19,"tag":37,"props":105,"children":107},{"className":106},[85],[108,111],{"type":19,"tag":88,"props":109,"children":110},{"disabled":90,"type":91},[],{"type":24,"value":112}," 在 CI 中包含流式场景的端到端性能基准",{"type":19,"tag":69,"props":114,"children":115},{},[],{"type":19,"tag":20,"props":117,"children":118},{},[119],{"type":24,"value":120},"相关链接：",{"type":19,"tag":33,"props":122,"children":123},{},[124,134],{"type":19,"tag":37,"props":125,"children":126},{},[127],{"type":19,"tag":128,"props":129,"children":131},"a",{"href":130},"/blog",[132],{"type":24,"value":133},"返回博客分类",{"type":19,"tag":37,"props":135,"children":136},{},[137],{"type":19,"tag":128,"props":138,"children":140},{"href":139},"/blog/topic/multi-agent-system",[141],{"type":24,"value":142},"查看热门话题",{"type":19,"tag":144,"props":145,"children":147},"h2",{"id":146},"初步纲要",[148],{"type":24,"value":146},{"type":19,"tag":33,"props":150,"children":151},{},[152,157,162,167,172],{"type":19,"tag":37,"props":153,"children":154},{},[155],{"type":24,"value":156},"主题简介",{"type":19,"tag":37,"props":158,"children":159},{},[160],{"type":24,"value":161},"背景与动机",{"type":19,"tag":37,"props":163,"children":164},{},[165],{"type":24,"value":166},"核心概念",{"type":19,"tag":37,"props":168,"children":169},{},[170],{"type":24,"value":171},"实践案例",{"type":19,"tag":37,"props":173,"children":174},{},[175],{"type":24,"value":176},"进一步扩展",{"type":19,"tag":144,"props":178,"children":180},{"id":179},"相关链接",[181],{"type":24,"value":179},{"type":19,"tag":33,"props":183,"children":184},{},[185,192,199],{"type":19,"tag":37,"props":186,"children":187},{},[188],{"type":19,"tag":128,"props":189,"children":190},{"href":130},[191],{"type":24,"value":133},{"type":19,"tag":37,"props":193,"children":194},{},[195],{"type":19,"tag":128,"props":196,"children":197},{"href":139},[198],{"type":24,"value":142},{"type":19,"tag":37,"props":200,"children":201},{},[202],{"type":19,"tag":128,"props":203,"children":205},{"href":204},"/blog/ai-architecture-deep-dive",[206],{"type":24,"value":207},"AI 架构深入",{"type":19,"tag":69,"props":209,"children":210},{},[],{"type":19,"tag":20,"props":212,"children":213},{},[214],{"type":24,"value":215},"⚠️ 本文为占位内容，后续将补充完整版本。",{"title":7,"searchDepth":217,"depth":217,"links":218},3,[219,220,221,222,224],{"id":29,"depth":217,"text":29},{"id":44,"depth":217,"text":44},{"id":57,"depth":217,"text":57},{"id":146,"depth":223,"text":146},2,{"id":179,"depth":223,"text":179},"markdown","content:blog:streaming-optimization.md","content","blog/streaming-optimization.md","blog/streaming-optimization","md",[232,240,248],{"_path":233,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":234,"description":235,"keywords":236,"author":11,"date":12,"category":13,"image":14,"_type":225,"_id":237,"_source":227,"_file":238,"_stem":239,"_extension":230},"/blog/2025-q1-updates","2025 Q1 产品更新","第一季度重大功能发布：AI 生成优化、新模板上线、编辑器增强等","2025 Q1 产品更新, Blog, HTMLPAGE","content:blog:2025-q1-updates.md","blog/2025-q1-updates.md","blog/2025-q1-updates",{"_path":241,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":242,"description":243,"keywords":244,"author":11,"date":12,"category":13,"image":14,"_type":225,"_id":245,"_source":227,"_file":246,"_stem":247,"_extension":230},"/blog/2025-roadmap","2025 产品路线图","展望 2025 年的产品规划：AI 能力增强、模板扩充、国际化等","2025 产品路线图, Blog, HTMLPAGE","content:blog:2025-roadmap.md","blog/2025-roadmap.md","blog/2025-roadmap",{"_path":249,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":250,"description":251,"keywords":252,"author":11,"date":12,"category":13,"image":14,"_type":225,"_id":253,"_source":227,"_file":254,"_stem":255,"_extension":230},"/blog/ab-testing","A/B 测试","通过 A/B 测试验证设计方案","A/B 测试, Blog, HTMLPAGE","content:blog:ab-testing.md","blog/ab-testing.md","blog/ab-testing",1774945277239]