Closed Bug 463298 Opened 16 years ago Closed 16 years ago

Taras' printf-profiling

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 459117

People

(Reporter: taras.mozilla, Assigned: taras.mozilla)

References

Details

(Keywords: meta, perf)

I compared firefox to fennec on my c2d at 1Ghz and notice it had a constant overhead on loading pages(>0.2 seconds). From oprofile looked like nsXPCWrappedJSClass::CallMethod was an interesting function. I hacked in a map to collect cpu time of every function called and get stuff like

nsIAutoCompleteInput::onTextEntered 1 calls, 320.312012ms total
nsIDOMEventListener::handleEvent 21 calls, 1968.750977ms total
nsIFactory::createInstance 1 calls, 7.813000ms total
nsILoginManagerStorage::countLogins 1 calls, 46.875000ms total
nsILoginManagerStorage::init 1 calls, 15.625000ms total
nsIModule::getClassObject 1 calls, 0.000000ms total
nsIWebProgressListener::onLocationChange 1 calls, 70.313004ms total
nsIWebProgressListener::onProgressChange 4 calls, 0.000000ms total
nsIWebProgressListener::onSecurityChange 1 calls, 46.875000ms total
nsIWebProgressListener::onStateChange 58 calls, 4117.188965ms total
nsIWebProgressListener::onStatusChange 28 calls, 23.438000ms total


So with this info i cut stuff out of onStateChange http://mxr.mozilla.org/mobile-browser/source/chrome/content/browser.js#409

Taking out translatePhoneNumbers saves 2.6seconds(out 4.1 above)
Taking out updateBrowser saves another 0.3seconds

This using www.w3.org/ as a reference since it renders quickly.
Depends on: 463322
Depends on: 463530
Depends on: 463538
Depends on: 463722
Depends on: 463745
Depends on: 464128
Depends on: 464129
Depends on: 465556
Depends on: 465128
Depends on: 464995
Depends on: 466578
Assignee: nobody → tglek
Keywords: meta, perf
Depends on: 466739
Depends on: 466877
Depends on: 468163
Depends on: 468733
Depends on: 468739
Depends on: 468760
Depends on: 468776
Depends on: 468886
Depends on: 469076
Taras:

Can you attach the patch for your printf-instrumented build?  Even if it's not pretty it might still be a useful reference for me when I start work on bug 467953.
i'm gonna package it up nicely next week, but if you want it asap I can post it.
Actually next week is fine.  I'm not going to be able to get to it before then anyway.
Depends on: 470116
Depends on: 470507
Depends on: 470810
Depends on: 470859
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.