Organizer: selecting a folder spends about 0.19 s per calculation on the main thread (ProjectContextPanel::initialize)

未关闭
#1,299 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
c

调研方向

Start by profiling ProjectContextPanel::initialize while selecting folders with many calculations, as described in the issue; compare local and SSH folders. Identify the per-row work rebuilding the mirror and reading properties, then address its cost or main-thread impact. Add a test that bounds selection time for a folder of N calculations.

由索引模型根据 Issue 内容生成。

描述

Selecting a folder in the Organizer does local work on the GUI main thread after the listing arrives, and that work grows with the number of calculations in the folder. Measured headless on an SSH folder, as the whole selection minus the remote script (#1220):

Folder Remote script Whole selection Local work
8 plain folders 68 ms 0.61 s ~0.4 s
300 plain folders 1.74 s 2.57 s ~0.8 s
20 calculations 2.16 s 5.93 s ~3.8 s

That is about 0.19 s per calculation. The tree rows and icons cost almost nothing (0.03 s for 300 rows), and getChildren was already cached. Most of the time is in setContextPanel → ProjectContextPanel::initialize, which rebuilds the mirror and reads properties for each row. It has not been profiled inside yet. At this rate a folder of 200 calculations would block the window for about 40 s. A local folder is probably affected too; this has not been checked.

To do: profile ProjectContextPanel::initialize on a folder with many calculations (local and SSH), remove the per-row cost or move it off the main thread, and add a test that bounds the selection time for a folder of N calculations.

主要语言
C
星标
10
派生
8
平均合并
6 小时 32 分钟
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

FriendsofECCE/ECCE 的其他 Issue

查看 FriendsofECCE/ECCE 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。