🌸
为什么说 tmux 这类 multiplexer 是性能杀手?除了 CSI 序列需要被翻译两遍外,我还找到另外一个原因: 昨天翻 wezterm 代码,发现为了适配 tmux 和 ConPty 被逼的只能加 sleep。ConPty 是 Windows 为了向后兼容在真实 TTY 和 Terminal emulator 加得一个兼容层,原理和 screen/tmux 类似。 不过 Windows 这个属于系统性设计失误,Windows terminal devs 已经承认这点,它不仅导致性能下降,还导致了像…
想给 Yazi 适配个 Mintty 图片预览,对,就是 Git Bash 带的那个终端。但图片位置一直是错的,在对线长达两周后,仍没丝毫进展,中途还发现个 Mintty bug,https://github.com/mintty/mintty/issues/1228
但在昨天一位 microsoft/terminal 贡献者提醒下,加了个 sleep,竟然就 work 了!!!
我们至今也没搞明白是哪出了问题,Mintty?Cygwin?ConPTY?不清楚,只有天知道。
在同样基于 ConPTY 的 WezTerm 没这问题,可能 WezTerm 已经加好必要的 sleep 了,这么一想准确知道哪里需要 sleep,哪里不需要,也算是不可替代的经验 🤣
但在昨天一位 microsoft/terminal 贡献者提醒下,加了个 sleep,竟然就 work 了!!!
我们至今也没搞明白是哪出了问题,Mintty?Cygwin?ConPTY?不清楚,只有天知道。
在同样基于 ConPTY 的 WezTerm 没这问题,可能 WezTerm 已经加好必要的 sleep 了,这么一想准确知道哪里需要 sleep,哪里不需要,也算是不可替代的经验 🤣
👍1
给 Yazi 做了一个文档站,这个 Showcase 页面是我最满意的。
https://yazi-rs.github.io/docs/showcase
用得 Docusaurus,头一次用,真的挺方便,直接写 JSX,4 个小函数就完成了 Showcase,一共不到 50 行。
(样式参考了 Docusaurus)
https://yazi-rs.github.io/docs/showcase
用得 Docusaurus,头一次用,真的挺方便,直接写 JSX,4 个小函数就完成了 Showcase,一共不到 50 行。
(样式参考了 Docusaurus)
👍5
重新实现了个 Rust 版的 natural sorting,case-insensitive 比现有的 natord crate 快了 ~6 倍。
起因是昨天 Yazi Discord 有人说最新的 Git 版打开 /nix/store 变慢了,调查下发现最近加了个 case-insensitive 排序支持,并设置成了默认;而 natord case-insensitive 非常慢,也已经 8 年没维护了。我没想到 Yazi 第一个性能瓶颈是 CPU 不是 IO。
对了,exa/eza 同样有这个性能问题,因为它也是用的 natord,打算找个时间把 Yazi 这个新实现 port 过去。
起因是昨天 Yazi Discord 有人说最新的 Git 版
对了,exa/eza 同样有这个性能问题,因为它也是用的 natord,打算找个时间把 Yazi 这个新实现 port 过去。
👍9
Yazi Terminal File Manager v0.1.5 发布!
这是有史以来最大的一次更新,包含 36 个新功能、24 个错误修复,和 3 项性能改进。
感谢每一位贡献者让 Yazi 变得越来越好!
https://github.com/sxyazi/yazi/releases/tag/v0.1.5
---
最近记性好差,到处都发了忘了往自己贫道发。。Reddit 也忘了写描述😭
这是有史以来最大的一次更新,包含 36 个新功能、24 个错误修复,和 3 项性能改进。
感谢每一位贡献者让 Yazi 变得越来越好!
https://github.com/sxyazi/yazi/releases/tag/v0.1.5
---
最近记性好差,到处都发了忘了往自己贫道发。。Reddit 也忘了写描述😭
GitHub
Release v0.1.5 · sxyazi/yazi
This is the biggest update ever, with 36 new features, 24 bug fixes, and 3 performance improvements.
Thank you to every contributor for making Yazi better and better!
What's Changed
feat: add ...
Thank you to every contributor for making Yazi better and better!
What's Changed
feat: add ...
👍3
This media is not supported in your browser
VIEW IN TELEGRAM
Yazi 4k ⭐️啦,谢谢大家的兴趣与热情!
一开始只是想写个工具自己用(顺便学 Rust),没想到有那么多人喜欢,真的很开心❤️️
一开始只是想写个工具自己用(顺便学 Rust),没想到有那么多人喜欢,真的很开心❤️️
👍6🥰2
🙏🏻寻求帮助:Yazi 需要一个新 SVG logo!
目前 logo AI 生成,辨识度很低,与其说 logo 不如说“一张鸭子的照片”。我们尝试用 vectorizer.ai 将其转换为 SVG 效果也不理想。
有人愿意帮忙重新设计一个吗,这是一些关键字:duck, cute, circular, colorful, minimalist style
目前 logo AI 生成,辨识度很低,与其说 logo 不如说“一张鸭子的照片”。我们尝试用 vectorizer.ai 将其转换为 SVG 效果也不理想。
有人愿意帮忙重新设计一个吗,这是一些关键字:duck, cute, circular, colorful, minimalist style
头一次遇到 Rust bug
https://github.com/sxyazi/yazi/issues/356
https://github.com/rust-lang/rust/issues/108277
原因是用户
https://github.com/sxyazi/yazi/issues/356
https://github.com/rust-lang/rust/issues/108277
原因是用户
$HOME 有无效创建时间的文件,Rust 会 panic 而不返回 Error。GitHub
Crash when entering or previewing Home · Issue #356 · sxyazi/yazi
What system are you running Yazi on? Linux Wayland What terminal are you running Yazi in? wezterm-gui 20231107-082518-f0e3eecb Yazi version yazi 0.1.5 Did you try the latest main branch to see if t...
🌸
头一次遇到 Rust bug https://github.com/sxyazi/yazi/issues/356 https://github.com/rust-lang/rust/issues/108277 原因是用户 $HOME 有无效创建时间的文件,Rust 会 panic 而不返回 Error。
🤣哈哈哈试了下 exa/eza 也会崩,看来所有 Rust 写的都绕不开这个 bug,摆了摆了。
复现方法
复现方法
touch -d "1969-12-31 23:59:59.1Z" abc#Yazi 去年 4 个月上了 26 次 GitHub Trending 🤯
https://github.com/search?q=repo%3Alarsbijl%2Ftrending_archive+sxyazi%2Fyazi&type=code
https://github.com/search?q=repo%3Alarsbijl%2Ftrending_archive+sxyazi%2Fyazi&type=code
👍7
头一次知道 "
刚探索把 Yazi TUI 从
然后发现这个讨论,https://github.com/ratatui-org/website/issues/274 ,
stdout was ~2.5x faster that stderr"刚探索把 Yazi TUI 从
stdout 换到 stderr,这样就能让 stdout 空出来干其它事,比如退出时打印文件路径。然后发现这个讨论,https://github.com/ratatui-org/website/issues/274 ,
stderr 比 stdout 要慢,原因是 stderr 没缓冲,得自己包一个。(谢谢依云姐姐浇浇)GitHub
Add stdout / stderr performance to FAQ · Issue #274 · ratatui-org/website
https://ratatui.rs/faq/#should-i-use-stdout-or-stderr See ratatui-org/ratatui#583 (comment) Valentin271 Dec 13, 2023 Oh that's interesting, stdout is also faster on my machine from ~1.60 to ~2 ...
👍5
为什么 stdout 比 stderr 快?
这篇博客从 I/O 流如何工作,到 TUI app 如何工作,再到如何测量 TUI FPS/性能,以及涵盖各语言的针对性优化 - 如何让 stderr 变快,如何让 stdout 变更快,非常值得一读!
BTW我也参与了该文审阅,虽然只修了几个typo,但是一次奇妙的旅程。
https://blog.orhun.dev/stdout-vs-stderr/
这篇博客从 I/O 流如何工作,到 TUI app 如何工作,再到如何测量 TUI FPS/性能,以及涵盖各语言的针对性优化 - 如何让 stderr 变快,如何让 stdout 变更快,非常值得一读!
BTW我也参与了该文审阅,虽然只修了几个typo,但是一次奇妙的旅程。
https://blog.orhun.dev/stdout-vs-stderr/
blog.orhun.dev
Why stdout is faster than stderr? - Orhun's Blog
Here be rats
👍10