校验逐键枚举目录,Comp 缓存和页面缓存没有上限 [AI Review]
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- csharp
- Domain
- desktop, performance
Research direction
Start with the synchronous validation path in PCL.Launcher/UI/Controls/Inputs/MyTextBox.cs and the filesystem validators it calls, then trace the static caches and page host lifetimes named in the issue. The issue proposes debounce, lifecycle caching, bounded Comp caches, and page host eviction or disposal across several subsystems. Done means input no longer enumerates on every character, the Comp cache has an enforced capacity, and memory stays stable during extended download page use.
Written by the indexing model from the issue text.
Description
🤖 这条 Issue 由 AI 代码审计批量生成,未经人工逐项复核。基线:
dev@2856c2a4(迁移范围9c4f1544..2856c2a4)。证据来自静态代码分析,欢迎在评论中补充或纠正。
现象
输入校验在每次按键时同步访问文件系统。资源缓存和页面宿主缓存都没有容量上限。
证据
PCL.Launcher/UI/Controls/Inputs/MyTextBox.cs:225-259:文本变化时同步执行校验。PCL.Core/Utils/Validate/FileNameValidator.cs:58-77、FolderNameValidator.cs:56-71:检查父目录下是否存在同名项。PCL.Core/Utils/Validate/FileSystemValidator.cs:13-29:每次校验都构造无效字符集合并做 LINQ 过滤。PCL.Launcher.Core/Comp/ProjectQuery.cs:17、Comp/FileCache.cs:12:静态缓存没有上限。PCL.Launcher.Core/Comp/Project.cs:126:CompProject构造函数把自己加入全局缓存。PCL.Launcher/Views/Pages/Download/PageDownloadHost.cs:12,45-55:每个访问过的下载子页都保留。PCL.Launcher/Navigation/PageRegistry.cs:12,81-110:所有页面宿主启动时创建并常驻。
影响
versions 目录很大时,输入实例名会卡顿。长时间浏览资源页和下载页,内存会持续增长。
建议
- 校验增加 150–250ms 防抖,目录枚举结果在页面生命周期内缓存。
- 提交或失焦时执行完整校验。
- Comp 缓存改成带 LRU、TTL 和容量上限的实例服务,移除构造函数副作用。
- 页面宿主增加 LRU 或
IDisposable,离开页面时释放图片、定时器和订阅。
验收
- 输入实例名时不再每个字符都枚举目录。
- Comp 缓存有明确上限,超过后能淘汰。
- 长时间浏览下载页内存保持稳定。
- Dominant language
- C#
- Stars
- 4.3k
- Forks
- 148
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 64
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PCL-Community/PCL-CE
-
崩溃日志只按 CRLF 分行Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PCL-Community/PCL-CE#3872 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
PCL-Community/PCL-CE#3871 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PCL-Community/PCL-CE#3867 ·
Maintainers usually reply within 1 day
-
[i18n] 安装实例完成后的成功提示未正确本地化Possibly taken @Lokins577 claimed this 35 days ago. Open👍 优质 🚧 正在处理
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
PCL-Community/PCL-CE#3658 · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PCL-Community/PCL-CE#3447 ·
Maintainers usually reply within 1 day
All issues in PCL-Community/PCL-CE
Similar issues
-
hand-to-AI
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
CactuseSecurity/firewall-orchestrator#5803 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 3 days
-
bug python
Difficulty 1/5 Under an hour Newbie friendliness 88/100
ilia-sokolov/OfficeAgent.NET#89 ·
Maintainers usually reply within 13 days