AcademySoftwareFoundation / AcademySoftwareFoundation/OpenColorIO

Optimize how code strings are built up to reduce the library size

未关闭
#2,004 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Feature Request help wanted
主要语言
C++
星标
2.1k
派生
503
PR 合并指标
30 天内没有已合并 PR

描述

As part of the nanoColor project, we have been trying to reduce the size of the library. Currently nanoColor is between 1.5-3 MB, depending on the platform and compiler flags but the goal is to get it down to 1 MB or less.

As we have profiled where the size of the existing library comes from, we noticed that there is a lot of size coming from modules that create code. For example, all the modules that build shader code for various GPU languages are among the largest. Another example is the way Exception message strings are built. All of this uses a pattern which is nice to read in the code but which creates a lot of temporary string objects that bloats the library size.

This proposal is to find a better way to build up these long strings from components that is both easy to read in the code but which is much more efficient in terms of the size of the library.

贡献指南

打开贡献指南

调研方向

首先分析构建 GPU 语言着色器代码的模块,以及 issue 中描述的异常消息字符串构造过程。比较组装长字符串的方法,然后验证库的大小是否在不损失可读性的情况下缩减至所述目标,即 1 MB 或更小。

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

评估

技术栈
cpp
领域
performance
Issue 类型
重构
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

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