Bug 1317312 - Tps should filter out glyph cache overhead. r=mconley

This commit is contained in:
Gabor Krizsanits 2017-01-03 14:00:21 +01:00
Родитель 965cffb389
Коммит 73c7a5a258
3 изменённых файлов: 13 добавлений и 2 удалений

Просмотреть файл

@ -157,7 +157,6 @@ function loadTPSContentScript(browser) {
.getInterface(Ci.nsIDOMWindowUtils);
let lastTransactionId = cwu.lastTransactionId;
Services.profiler.AddMarker("Content waiting for id > " + lastTransactionId);
addEventListener("MozAfterPaint", function onPaint(event) {
Services.profiler.AddMarker("Content saw transaction id: " + event.transactionId);
if (event.transactionId > lastTransactionId) {
@ -402,6 +401,18 @@ function test(window) {
let tabs = gBrowser.getTabsToTheEndFrom(initialTab);
let times = [];
for (let tab of tabs) {
// Let's do an initial run to warm up any paint related caches
// (like glyph caches for text). In the next loop we will start with
// a GC before each switch so we don't need here.
// Note: in case of multiple content processes, closing all the tabs
// would close the related content processes, and even if we kept them
// alive it would be unlikely that the same pages end up in the same
// content processes, so we cannot do this at the manifest level.
yield switchToTab(tab);
yield switchToTab(initialTab);
}
for (let tab of tabs) {
yield forceGC(win, tab.linkedBrowser);
let time = yield switchToTab(tab);

Просмотреть файл

@ -4,7 +4,7 @@
<em:id>tab-switch-test@lassey.us</em:id>
<em:type>2</em:type>
<em:name>Tab Switch Test</em:name>
<em:version>1.0.2</em:version>
<em:version>1.0.3</em:version>
<em:optionsType>2</em:optionsType>
<em:optionsURL>chrome://tabswitch/content/options.xul</em:optionsURL>
<em:bootstrap>true</em:bootstrap>

Двоичный файл не отображается.