Potentially slow iteration for setting condition value units

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

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
data

调研方向

从 cf/query.py 的第 890-896 行以及 pull request 427 中的相关讨论开始,重点关注如何处理由 Data 对象表示的条件值。在 lama-to-dask 分支上确认其行为,并在避免遍历大型 Data 对象的同时保留现有的单位设置结果。

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

描述

dask performance

As noted by @davidhassell in the review thread https://github.com/NCAS-CMS/cf-python/pull/427#discussion_r1040910208, the crux being:

if a large set is stored as a Data object, as opposed to a python built-in like a list, then iterating through it could be slow

relating to the code (currently on the lama-to-dask branch only):

https://github.com/NCAS-CMS/cf-python/blob/f17e08ee69b271c3b595131ef93d25f4bb3c2395/cf/query.py#L890-L896

with a suggested solution of:

For the Data object case we could just change the units without iterating through.

主要语言
Python
星标
150
派生
23
平均合并
1 天 11 小时
30 天内合并 PR
2

贡献指南

打开贡献指南

从这里开始

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

NCAS-CMS/cf-python 的其他 Issue

查看 NCAS-CMS/cf-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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