Commit cc81e830 authored by vadimt's avatar vadimt Committed by Commit bot

Instrumenting copying string returned by GetRawDataResource to locate the source of jankiness.

Previous instrumentations showed that the jank is in this line:
*data = rb.GetRawDataResource(resource_id_).as_string();
And its average run time is 15.1 ms.
I also know that the expensive operation is outside of ResourceBundle::GetRawDataResourceForScale.
So, we have to suggest that it's indeed copying the string that is responsible for the jank.

BUG=422489

Review URL: https://codereview.chromium.org/702543005

Cr-Commit-Position: refs/heads/master@{#302686}
parent d38ccdc3
......@@ -75,7 +75,15 @@ class URLRequestResourceBundleJob : public net::URLRequestSimpleJob {
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422489 URLRequestResourceBundleJob::GetData 1"));
*data = rb.GetRawDataResource(resource_id_).as_string();
const base::StringPiece resource_as_string_piece =
rb.GetRawDataResource(resource_id_);
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422489 is fixed.
tracked_objects::ScopedTracker tracking_profile15(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422489 URLRequestResourceBundleJob::GetData 1.5"));
*data = resource_as_string_piece.as_string();
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422489 is fixed.
tracked_objects::ScopedTracker tracking_profile2(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment