AcademySoftwareFoundation / AcademySoftwareFoundation/OpenColorIO
Not using SEARCH_REFERENCE_SPACE_ALL results in significantly slower calls
- 主要言語
- C++
- スター
- 2.1k
- フォーク
- 505
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Both `getNumColorSpaces` and `getColorSpaceNameByIndex` become much slower when using `SEARCH_REFERENCE_SPACE_SCENE` for example. For instance when using the ACES 1.2 config, `PopulateOCIOMenus` in `ociodisplay` goes from 0.74s to 8.1s on my windows workstation (see screenshot below).
This is primarily caused by the string comparison function: `ToLower` but also the new string allocation (going from `getName()`'s `const char*` to `const std::string&`

Replacing `StringUtils::Compare` with `::strcmp(...) == 0` cuts most of the cost down (0.9s instead of 8.1s). I think a faster method than the current approach would be needed in cases like these.
コントリビューションガイド
調査の方向性
PopulateOCIOMenus の呼び出しから getNumColorSpaces と getColorSpaceNameByIndex を追跡し、続いて StringUtils::Compare、ToLower、および検索に関係する getName() の戻り値の型を調べてください。報告されたパスで ACES 1.2 構成のベンチマークを実行し、より高速な比較によって結果が維持され、回帰が低減されることを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp
- 領域
- computer-graphics, performance
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100