| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
: v8::ScriptCompiler::kNoCacheBecauseInlineScript;we can keep this, it's distinct from `kNoCacheBecauseCacheTooCold` which is set below if there is a cache handler but no cache inside. It could be worthwhile to extend the CacheBehaviour enum to include a separate `kNoCacheBecauseInlineScriptCacheTooCold`
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
if (source_text_length < features::kInlineScriptCacheMinScriptLength.Get()) {Add `source_location_type == ScriptSourceLocationType::kInline &&`
(Otherwise, `kInlineScriptCacheMinScriptLength` would be applied to non-inline scripts if `kInlineScriptCacheMinScriptLength < kMinimalCodeLengthForNonInlineScript`.
no_cache_reason = v8::ScriptCompiler::kNoCacheBecauseScriptTooSmall;nit: `CHECK(features::IsInlineScriptCacheEnabled());`
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
: v8::ScriptCompiler::kNoCacheBecauseInlineScript;we can keep this, it's distinct from `kNoCacheBecauseCacheTooCold` which is set below if there is a cache handler but no cache inside. It could be worthwhile to extend the CacheBehaviour enum to include a separate `kNoCacheBecauseInlineScriptCacheTooCold`
Thanks for suggestion! I reverted this change and added `v8::ScriptCompiler::kNoCacheBecauseInlineScriptCacheTooCold`. PTAL
if (source_text_length < features::kInlineScriptCacheMinScriptLength.Get()) {Add `source_location_type == ScriptSourceLocationType::kInline &&`
(Otherwise, `kInlineScriptCacheMinScriptLength` would be applied to non-inline scripts if `kInlineScriptCacheMinScriptLength < kMinimalCodeLengthForNonInlineScript`.
Done
no_cache_reason = v8::ScriptCompiler::kNoCacheBecauseScriptTooSmall;Takashi Nakayamanit: `CHECK(features::IsInlineScriptCacheEnabled());`
Added `features::IsInlineScriptCacheEnabled() &&` to the if condition instead.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
source_text_length < features::kInlineScriptCacheMinScriptLength.Get()) {still I prefer `CHECK(features::IsInlineScriptCacheEnabled());` here, as it's clearer that Lines 434-449 is just applying different threshold for inline/external scripts.
The current patch set, the `features::IsInlineScriptCacheEnabled() &&` inside `if` makes me wonder:
Hmm, then if `features::IsInlineScriptCacheEnabled()` is false, no length limit is imposed for `kInline`?
Actually this is unnecessary thought, as the cache handler should be null and we should have early-returned in such cases. I prefer `CHECK()`ing instead, to avoid such unnecessary thoughts.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
source_text_length < features::kInlineScriptCacheMinScriptLength.Get()) {still I prefer `CHECK(features::IsInlineScriptCacheEnabled());` here, as it's clearer that Lines 434-449 is just applying different threshold for inline/external scripts.
The current patch set, the `features::IsInlineScriptCacheEnabled() &&` inside `if` makes me wonder:
Hmm, then if `features::IsInlineScriptCacheEnabled()` is false, no length limit is imposed for `kInline`?
Actually this is unnecessary thought, as the cache handler should be null and we should have early-returned in such cases. I prefer `CHECK()`ing instead, to avoid such unnecessary thoughts.
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
: v8::ScriptCompiler::kNoCacheBecauseInlineScript;Takashi Nakayamawe can keep this, it's distinct from `kNoCacheBecauseCacheTooCold` which is set below if there is a cache handler but no cache inside. It could be worthwhile to extend the CacheBehaviour enum to include a separate `kNoCacheBecauseInlineScriptCacheTooCold`
Thanks for suggestion! I reverted this change and added `v8::ScriptCompiler::kNoCacheBecauseInlineScriptCacheTooCold`. PTAL
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
21 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
Add feature flag for inline script cache
Introduce the `kInlineScriptCache` feature flag and associated
parameters to support caching for inline scripts. Since
InlineScriptCache is built upon PersistentCodeCache, a new helper
function `IsInlineScriptCacheEnabled()` is introduced to ensure the
feature activates when all necessary flags are set.
This CL also introduces a configurable minimum script length check for
inline scripts.
DesignDoc:
https://docs.google.com/document/d/1pVFb79e5vkKJI7nZ15BXZFbNji_mB2Y8eZPGhEpK3jE/edit?usp=sharing
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |