AcademySoftwareFoundation / AcademySoftwareFoundation/OpenColorIO
Optimize how code strings are built up to reduce the library size
- 主要言語
- 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
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100