<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>流式处理 | 锤子前端</title><description>Now vibe coding, so learning hammer FE ?</description><link>https://channel.meo-ai.com</link><item><title>《hucre：零依赖的电子表格引擎》</title><link>https://channel.meo-ai.com/posts/693</link><guid isPermaLink="true">https://channel.meo-ai.com/posts/693</guid><pubDate>Sat, 15 Aug 2026 13:03:55 GMT</pubDate><content:encoded>&lt;span class=&quot;post-title-source&quot;&gt;《hucre：零依赖的电子表格引擎》&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;标签：&lt;br /&gt;&lt;a href=&quot;/search/result?q=%23Web%E5%BC%80%E5%8F%91&quot; title=&quot;#Web开发&quot;&gt;#Web开发&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23TypeScript&quot; title=&quot;#TypeScript&quot;&gt;#TypeScript&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E7%94%B5%E5%AD%90%E8%A1%A8%E6%A0%BC&quot; title=&quot;#电子表格&quot;&gt;#电子表格&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23Xlsx&quot; title=&quot;#Xlsx&quot;&gt;#Xlsx&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23Csv&quot; title=&quot;#Csv&quot;&gt;#Csv&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23Ods&quot; title=&quot;#Ods&quot;&gt;#Ods&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E6%95%B0%E6%8D%AE%E8%BD%AC%E6%8D%A2&quot; title=&quot;#数据转换&quot;&gt;#数据转换&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E9%9B%B6%E4%BE%9D%E8%B5%96&quot; title=&quot;#零依赖&quot;&gt;#零依赖&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E6%B5%81%E5%BC%8F%E5%A4%84%E7%90%86&quot; title=&quot;#流式处理&quot;&gt;#流式处理&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E6%95%B0%E6%8D%AE%E9%AA%8C%E8%AF%81&quot; title=&quot;#数据验证&quot;&gt;#数据验证&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E6%97%A0%E9%9A%9C%E7%A2%8D%E8%AE%BF%E9%97%AE&quot; title=&quot;#无障碍访问&quot;&gt;#无障碍访问&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;总结：&lt;br /&gt;&lt;br /&gt;文章要点：&lt;br /&gt;1. 核心定位：一个纯 TypeScript 编写的零依赖电子表格引擎，支持读写 XLSX、CSV、ODS、JSON、NDJSON、XML、HTML 等多种格式，可在 Node.js、Deno、Bun、浏览器、Cloudflare Workers 等任意平台运行&lt;br /&gt;2. 极致轻量：完全支持 Tree Shaking，按需导入，CSV 模块仅 3.7KB gzip，完整库 129KB gzip，远小于 SheetJS（300KB）和 ExcelJS（500KB）&lt;br /&gt;3. 多格式统一 API：通过 &lt;code&gt;read()&lt;/code&gt; 自动检测格式，&lt;code&gt;write()&lt;/code&gt; 支持 9 种输出格式（XLSX、ODS、CSV、TSV、JSON、NDJSON、XML、HTML、Markdown），大幅降低多格式处理的心智负担&lt;br /&gt;4. &lt;mark class=&quot;highlight&quot;&gt;流式处理&lt;/mark&gt;：支持 XLSX、CSV、NDJSON、ODS、XML 的流式读写，可处理百万级数据而不爆内存；300万行 XLSX 流式写入峰值内存仅 70MB，而增量写入器需要 1GB+&lt;br /&gt;5. 功能全面：支持单元格样式、条件格式（13 种）、数据验证、超链接、图片（含 SVG）、图表（柱状/折线/饼图等）、数据透视表、迷你图、冻结窗格、密码保护、Excel 2024 原生复选框、模板引擎等&lt;br /&gt;6. 往返保真：&lt;code&gt;openXlsx&lt;/code&gt;/&lt;code&gt;saveXlsx&lt;/code&gt; 路径可保留图表、VBA 宏、切片器、时间线过滤器等 hucre 不原生建模的部分，实现无损编辑他人文件&lt;br /&gt;7. 数据验证与无障碍：内置 Schema 验证（类型强制、正则、枚举、范围），以及 WCAG 2.1 AA 无障碍审计（对比度检查、缺失替代文本、表头检测等）&lt;br /&gt;8. 遗留格式支持：可读取 XLS（Excel 97-2003）和 XLSB（二进制 Excel）文件，自动检测格式&lt;br /&gt;9. 开发体验友好：提供 Builder API 链式调用、对象简写读写（&lt;code&gt;readObjects&lt;/code&gt;/&lt;code&gt;writeObjects&lt;/code&gt;）、CLI 工具（格式转换、检查、验证）、单元格工具函数（行列转换、范围解析）&lt;br /&gt;10. 明确的能力边界：不实现公式计算引擎、不支持 XLS/XLSB 写入、部分高级图表类型（气泡图/雷达图等）仅支持读取和往返、流式 ODS 写入不带样式&lt;br /&gt;&lt;br /&gt;URL：&lt;a href=&quot;https://github.com/productdevbook/hucre&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;https://github.com/productdevbook/hucre&quot;&gt;https://github.com/productdevbook/hucre&lt;/a&gt;&lt;a class=&quot;tgme_widget_message_link_preview&quot; href=&quot;https://github.com/productdevbook/hucre&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;Zero-dependency spreadsheet engine. Read &amp;amp; write XLSX, CSV, ODS. Pure TypeScript, works everywhere. - productdevbook/hucre&quot;&gt;
  
  &lt;div class=&quot;link_preview_site_name accent_color&quot;&gt;GitHub&lt;/div&gt;
  &lt;img class=&quot;link_preview_image&quot; alt=&quot;GitHub - productdevbook/hucre: Zero-dependency spreadsheet engine. Read &amp;amp; write XLSX, CSV, ODS. Pure TypeScript, works everywhere.&quot; src=&quot;/static/https://cdn4.telesco.pe/file/MJcnXpxpA3YeVtM-Tm5vhddBRePR-Iiy7xQfjh0W5GjjXgCWMvURyaufUW9XrSUFu02S0RODegcGhxzJ8HSISdwFSgv4a3ZhHWQJuOCC0qQuH0EdyatC4ZEy9_nZr6TzfooahohpRRD0QcWrIVL9EWMiCMDY0Cpm3XNUlGuaMc8u5o_98ecZ4Q7GsDla-h9Up2ChebVJ1WQy-Vq7GbaRMHNkCHX5q7_j_U4iwkdmPXJQvtJ1kyKJR7WBdVWyhk8tHITkfV5Xbmqyx6yhd-hXxyunomCEXs7BP3-HQw1s58YG6x6X-G47h9t2AxaRD-TviTPWDoEAMjETvPLU2YOtQA.jpg&quot; width=&quot;1200&quot; height=&quot;630&quot; loading=&quot;eager&quot; /&gt;
  &lt;div class=&quot;link_preview_title&quot;&gt;GitHub - productdevbook/hucre: Zero-dependency spreadsheet engine. Read &amp;amp; write XLSX, CSV, ODS. Pure TypeScript, works everywhere.&lt;/div&gt;
  &lt;div class=&quot;link_preview_description&quot;&gt;Zero-dependency spreadsheet engine. Read &amp;amp; write XLSX, CSV, ODS. Pure TypeScript, works everywhere. - productdevbook/hucre&lt;/div&gt;
&lt;/a&gt;</content:encoded></item><item><title>《Node.js流内存泄漏生产级排查手册：五大隐蔽陷阱与五则铁律》</title><link>https://channel.meo-ai.com/posts/653</link><guid isPermaLink="true">https://channel.meo-ai.com/posts/653</guid><pubDate>Sun, 31 May 2026 14:26:16 GMT</pubDate><content:encoded>&lt;span class=&quot;post-title-source&quot;&gt;《Node.js流内存泄漏生产级排查手册：五大隐蔽陷阱与五则铁律》&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;标签：&lt;a href=&quot;/search/result?q=%23NodeJS&quot; title=&quot;#NodeJS&quot;&gt;#NodeJS&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E5%90%8E%E7%AB%AF&quot; title=&quot;#后端&quot;&gt;#后端&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E6%B5%81%E5%A4%84%E7%90%86&quot; title=&quot;#流处理&quot;&gt;#流处理&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E5%86%85%E5%AD%98%E4%BC%98%E5%8C%96&quot; title=&quot;#内存优化&quot;&gt;#内存优化&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E6%80%A7%E8%83%BD%E8%B0%83%E4%BC%98&quot; title=&quot;#性能调优&quot;&gt;#性能调优&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;总结：&lt;br /&gt;&lt;br /&gt;文章要点：&lt;br /&gt;1. 五大隐蔽泄漏模式：①客户端断开但服务端未感知（legacy pipe() 不处理 premature close）②手动事件解绑是噩梦（async iterator 的 break 自动触发 destroy）③超时只杀响应不杀上游（AbortSignal.timeout 才能全链路终止）④数据库生命周期绑定网络速度（应解耦上游资源与下游传输）⑤pipeline() 异步 destroy 的竞态窗口（catch 里手动补刀 source.destroy）&lt;br /&gt;2. 五则生产铁律：Rule 1 永远用 pipeline() 替代 .pipe()，自动处理错误/完成/背压传播；Rule 2 尊重 .write() 的布尔返回值，并掌握防&quot;Drain Hang&quot;的 AbortController 竞速清理写法；Rule 3 谁创建谁销毁，try/finally + AbortSignal 是标配；Rule 4 用 --max-old-space-size=128 做本地压测，看 writableLength 是否脱离 highWaterMark 失控飙升；Rule 5 写单元测试验证背压，用低 highWaterMark 的慢消费者 mock 检测队列是否暴涨&lt;br /&gt;3. 未来方向：Node.js 正推动&quot;stream-less future&quot;，用纯 async generator + pipeline() 替代 legacy Stream API，从 push 模式转为 pull 模式，背压协作变成结构性而非手动检查；Node.js 22 的 stream.compose() 可将多个 generator/流封装为可复用的 Duplex 单元&lt;br /&gt;4. 核心洞察：Node.js 流基于信任系统，破坏信任时不会大声报错，而是静默累积直到崩溃。四行修复代码（检查 write 返回值 + await drain）只是起点，真正的挑战在于理解生产环境中连接断开、超时、慢网络等边界情况&lt;br /&gt;&lt;br /&gt;URL：&lt;a href=&quot;https://frontendmasters.com/blog/the-production-playbook-for-node-js-stream-leaks/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;https://frontendmasters.com/blog/the-production-playbook-for-node-js-stream-leaks/&quot;&gt;https://frontendmasters.com/blog/the-production-playbook-for-node-js-stream-leaks/&lt;/a&gt;&lt;a class=&quot;tgme_widget_message_link_preview&quot; href=&quot;https://frontendmasters.com/blog/the-production-playbook-for-node-js-stream-leaks&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;This is Part 2 of a two-part series. Part 1 covered the core mental model of backpressure, why highWaterMarkisn’t a safety net, the .pipe()to pipeline() migration, and why async/awaitdoesn’t solve data volume problems. We also fixed the immediate crisis:…&quot;&gt;
  
  &lt;div class=&quot;link_preview_site_name accent_color&quot;&gt;Frontend Masters&lt;/div&gt;
  &lt;img class=&quot;link_preview_image&quot; alt=&quot;The Production Playbook for Node.js Stream Leaks&quot; src=&quot;/static/https://cdn4.telesco.pe/file/MHq7Fj5lgHoyVhtMtp8D2IAryNoFLf4FUJO-M6hwQRKWqdU6yEmHBFMQ4e9uyBV_sf9MMawdxvLUKNlKu-TpP831ksZpPlfFXxpPLpUsL2LFnjWZq7kVLuHqKhZzCEkKjmmo5puFtzHlMPbJPbMNeISm3UhmXTy-jUNun6btyy2QCBPNn4g-7zz_sp1s27vBJKlCHOIT1119yvg5kKQ7GS6hlealhyt9jiUxpizJ7oZj58U-u0yXh0coj98VdLWYzpjgd2jZ_I3AyVCIQrZNBKvmTjNcYEWuBTd2wG5ffvXFj9jozm5AA5E6vurRrr-RyzeWA_8xXEgGiboYsUkkMA.jpg&quot; width=&quot;1200&quot; height=&quot;630&quot; loading=&quot;eager&quot; /&gt;
  &lt;div class=&quot;link_preview_title&quot;&gt;The Production Playbook for Node.js Stream Leaks&lt;/div&gt;
  &lt;div class=&quot;link_preview_description&quot;&gt;This is Part 2 of a two-part series. Part 1 covered the core mental model of backpressure, why highWaterMarkisn’t a safety net, the .pipe()to pipeline() migration, and why async/awaitdoesn’t solve data volume problems. We also fixed the immediate crisis:…&lt;/div&gt;
&lt;/a&gt;</content:encoded></item></channel></rss>