DescriptionFix MQEvaluator::mediaType() related perf regressions.
When we stopped storing the mediaType as a string on m_medium on StyleResolver,
we started calling FrameView::mediaType() every time that the mediaType as required.
In the related bug's test case, mediaType() was being called a lot,
in order to compare it to "print" to see which default style sheet should be used.
Since mediaType() calls also call InspectorInstrumentation::applyEmulatedMedia(),
they have a certain overhead, that impacted the benchmark's results.
I've changed it so that the mediaType() call and the comparison to "print"
would be done once, and the result cached.
BUG=394275
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=179991
Patch Set 1 #Patch Set 2 : Build issue #Patch Set 3 : Changed approach #
Total comments: 1
Patch Set 4 : perf test #Patch Set 5 : Really fix the issue #
Total comments: 1
Messages
Total messages: 14 (0 generated)
|