Speed up the dashboard
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 重构
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- python
调研方向
首先使用 1.6MB 和 3.3MB 的 CSV 数据集对 dashboard 进行性能分析,重点关注初始处理和 color-by map 选择。阅读 Dash 的性能文档,并比较其中提到的 caching、Patch Class、orjson 和 clientside callback 选项。完成的标准是确定瓶颈,并证明在不破坏 dashboard 的情况下可以实现更快的加载和地图更新。
由索引模型根据 Issue 内容生成。
描述
Currently, the dashboard starts to slow down with datasets at about 1.6MB, this becomes more pronounced by 3.3MB (CSV with about 12,000 rows by 15 columns).
The slow down is most pronounced in
- Initial processing of the dataset (hence we have a loading indicator).
- Selecting different color-by options for the map distribution; the change in the map has a pronounced delay.
Diagnosing the specific source of the slow down (if it's one or more reasons) is still required.
The Dash documentation provides various suggestions under their performance section, and the dash-extensions package also has some options:
- Flask caching. Since the processing is only done once, this would only have potential to speed up the graphing components, though initial testing didn't seem to show improvement.
a. A similar solution is background caching.
b. Dash-extensions has a package for server-side caching: ServersideOutput Transform. This removes the need for JSON serialization between callbacks and should speed things up, though I'm not sure how effective it was (I tried an implementation on the server-store branch). This would also require a regular clean-up of the cached files (as with the previous two). - Dash Patch Class for updating the map (and potentially other graphs as well). Plotly express is fast, but starts to slow down around 15K points (per dash performance docs). I attempted to implement this with the map, but my initial attempt was unsuccessful.
- Using orjson. I'm unclear on precisely how this potential solution works, it seems (and this) that having the package installed allows dash to serialize json strings with orjson instead. There are errors thrown if you try to use it for the serialization (the speedup comes from the fact that it's bytes).
- Clientside Callbacks. To implement this, the graphing portion would have to be translated into Javascript.
- 主要语言
- Python
- 星标
- 6
- 派生
- 2
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Imageomics/dashboard-prototype 的其他 Issue
-
enhancement help wanted question UX
难度 4/5 3-5 天 新手友好度 35/100
-
enhancement
难度 4/5 3-5 天 新手友好度 35/100
-
organization
难度 5/5 一周以上 新手友好度 25/100
-
question
难度 5/5 一周以上 新手友好度 25/100
-
enhancement question
难度 5/5 一周以上 新手友好度 25/100
查看 Imageomics/dashboard-prototype 的全部 Issue
相似的 Issue
-
automated endpoint-dead needs-curation
难度 2/5 1-3 小时 新手友好度 72/100
almanac-data/climate-almanac#138 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 67/100
OceanDataTools/openrvdas#760 ·
维护者通常 1 天内回复
-
level/subtask type/enhancement
难度 2/5 1-3 小时 新手友好度 75/100
wazuh/wazuh-virtual-machines#1091 ·
维护者通常 1 天内回复
-
Python: Bug: ChatMessageContent.from_element drops AudioContent and BinaryContent into raw TextContent可能已有人在做 @halcyon-past 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
microsoft/semantic-kernel#14824 · 1 条评论 ·
维护者通常 3 天内回复
-
help wanted
难度 2/5 1-3 小时 新手友好度 78/100
stack314/django-neolith#142 · 1 条评论 ·
维护者通常 1 天内回复