Skip to content

cobalt/gpu: disable GPU shader disk cache - #13044

Merged
ckim1346 merged 1 commit into
youtube:mainfrom
ckim1346:gpu-shader-disk-cache
Oct 1, 2026
Merged

ckim1346 merged 1 commit into
youtube:mainfrom
ckim1346:gpu-shader-disk-cache

Conversation

@ckim1346

@ckim1346 ckim1346 commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

This PR appends the kDisableGpuShaderDiskCache switch in cobalt_main_delegate.cc. It's likely that its experiment showing positive YTT could have been due to arm imbalance and that the cache in reality is mostly seeing regressions in app start latency. Keeping as a one-line change if it's decided to be re-enabled in the future.

See previous PR's: #12722 , #11752

Bug: 522949412
Bug: 567569625

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor
Context State Description
CI / All Pass ✅ PASS All checks passed
CI / android ✅ PASS Passed
CI / evergreen ✅ PASS Passed
CI / linux ✅ PASS Passed
CI / tvos ✅ PASS Passed
@github-actions

Copy link
Copy Markdown
Contributor

🤖 Gemini Suggested Commit Message


android: Disable GPU shader disk cache

Disable the GPU shader disk cache to address regressions in application
start latency. While previous experiments suggested positive impact,
further analysis indicates those results may have been skewed by arm
imbalance. This change prioritizes startup performance while allowing
the feature to be easily re-enabled in the future if necessary.

Bug: 522949412
Bug: 567569625

💡 Pro Tips for a Better Commit Message:

  1. Influence the Result: Want to change the output? You can write custom prompts or instructions directly in the Pull Request description. The model uses that text to generate the message.
  2. Re-run the Generator: Post a comment with: /generate-commit-message
@ckim1346
ckim1346 requested a review from johnxwork September 30, 2026 22:59
@ckim1346
ckim1346 marked this pull request as ready for review September 30, 2026 22:59

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds the switches::kDisableGpuShaderDiskCache command-line switch to CobaltMainDelegate::BasicStartupComplete(). However, this change is applied unconditionally across all platforms. Since this optimization appears to be intended specifically for Android, it should be wrapped in an #if defined(OS_ANDROID) preprocessor block to avoid disabling the GPU shader disk cache on other platforms.

Comment thread cobalt/app/cobalt_main_delegate.cc Resolved
@ckim1346 ckim1346 changed the title android: disable GPU shader disk cache Sep 30, 2026
@ckim1346
ckim1346 merged commit 5472309 into youtube:main Oct 1, 2026
589 of 822 checks passed
@github-actions github-actions Bot added the cp-27.lts Cherry Pick to the 27.lts branch label Oct 1, 2026
@oxve oxve removed the cp-27.lts Cherry Pick to the 27.lts branch label Oct 5, 2026
briantting pushed a commit that referenced this pull request Oct 6, 2026
Refer to original PR: #13044

This PR appends the `kDisableGpuShaderDiskCache` switch in
`cobalt_main_delegate.cc`. It's likely that its experiment showing
positive YTT could have been due to arm imbalance and that the cache in
reality is mostly seeing regressions in app start latency. Keeping as a
one-line change if it's decided to be re-enabled in the future.

See previous PR's: #12722 , #11752

Bug: 522949412
Bug: 567569625

(cherry picked from commit 5472309)
@ckim1346
ckim1346 deleted the gpu-shader-disk-cache branch October 6, 2026 18:34
briantting pushed a commit that referenced this pull request Oct 16, 2026
Refer to original PR: #13044

This PR appends the `kDisableGpuShaderDiskCache` switch in
`cobalt_main_delegate.cc`. It's likely that its experiment showing
positive YTT could have been due to arm imbalance and that the cache in
reality is mostly seeing regressions in app start latency. Keeping as a
one-line change if it's decided to be re-enabled in the future.

See previous PR's: #12722 , #11752

Bug: 522949412
Bug: 567569625

(cherry picked from commit 5472309)
briantting pushed a commit that referenced this pull request Oct 16, 2026
Refer to original PR: #13044

This PR appends the `kDisableGpuShaderDiskCache` switch in
`cobalt_main_delegate.cc`. It's likely that its experiment showing
positive YTT could have been due to arm imbalance and that the cache in
reality is mostly seeing regressions in app start latency. Keeping as a
one-line change if it's decided to be re-enabled in the future.

See previous PR's: #12722 , #11752

Bug: 522949412
Bug: 567569625

(cherry picked from commit 5472309)
ryannchoi added a commit that referenced this pull request Oct 20, 2026
CobaltMainDelegate appends --disable-gpu-shader-disk-cache unconditionally
(#13044), so every launch recompiles all Skia/GL shaders, and on a
preloaded launch that work sits directly on the user's path to the first
frame. On Starboard, skip the disable switch only for a concealed
launch=preload start (started invisible with launch=preload on the
command line), and compile the existing ShaderCache / GrShaderCache
directory overrides in CobaltContentBrowserClient for Starboard too.

All other launches, and all non-Starboard platforms, keep the cache
disabled as before.

b/538037113
ryannchoi added a commit that referenced this pull request Oct 22, 2026
CobaltMainDelegate appends --disable-gpu-shader-disk-cache unconditionally
(#13044), so every launch recompiles all Skia/GL shaders, and on a
preloaded launch that work sits directly on the user's path to the first
frame. On Starboard, skip the disable switch only for a concealed
launch=preload start (started invisible with launch=preload on the
command line), and compile the existing ShaderCache / GrShaderCache
directory overrides in CobaltContentBrowserClient for Starboard too.

All other launches, and all non-Starboard platforms, keep the cache
disabled as before.

b/538037113
ryannchoi added a commit that referenced this pull request Oct 22, 2026
CobaltMainDelegate appends --disable-gpu-shader-disk-cache unconditionally
(#13044), so every launch recompiles all Skia/GL shaders, and on a
preloaded launch that work sits directly on the user's path to the first
frame. On Starboard, skip the disable switch only for a concealed
launch=preload start (started invisible with launch=preload on the
command line), and compile the existing ShaderCache / GrShaderCache
directory overrides in CobaltContentBrowserClient for Starboard too.

All other launches, and all non-Starboard platforms, keep the cache
disabled as before.

b/538037113
ryannchoi added a commit to ryannchoi/cobalt that referenced this pull request Oct 26, 2026
CobaltMainDelegate appends --disable-gpu-shader-disk-cache for every
launch (youtube#13044), so each launch recompiles all Skia shaders, and on a
preloaded launch that work sits directly on the user's path to the first
frame. youtube#13164 re-enables the cache behind kCobaltGpuShaderDiskCache on
Android only. On Starboard, remove the switch again in
PostEarlyInitialization() for a preload launch: started concealed
(kSbEventTypePreload) with launch=preload on the command line. Visible
launches, concealed launches without launch=preload, and all other
platforms are unchanged. The ShaderCache / GrShaderCache directory
overrides now also compile on Starboard, where GrShaderCache follows
kCobaltStorageCleanup like ShaderCache since the cache is enabled per
launch rather than by the Android feature.

Bug: 538037113
ryannchoi added a commit to ryannchoi/cobalt that referenced this pull request Oct 26, 2026
CobaltMainDelegate appends --disable-gpu-shader-disk-cache for every
launch (youtube#13044), so each launch recompiles all Skia shaders, and on a
preloaded launch that work sits directly on the user's path to the first
frame. youtube#13164 re-enables the cache behind kCobaltGpuShaderDiskCache on
Android only. On Starboard, remove the switch again in
PostEarlyInitialization() for a preload launch: started concealed
(kSbEventTypePreload) with launch=preload on the command line. Visible
launches, concealed launches without launch=preload, and all other
platforms are unchanged. The ShaderCache / GrShaderCache directory
overrides now also compile on Starboard, where GrShaderCache follows
kCobaltStorageCleanup like ShaderCache since the cache is enabled per
launch rather than by the Android feature.

Bug: 538037113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants