AcademySoftwareFoundation / AcademySoftwareFoundation/OpenColorIO

Not using SEARCH_REFERENCE_SPACE_ALL results in significantly slower calls

オープン
#1,709 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
help wanted
主要言語
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&`
string_comparison

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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。