Bug 24913
Summary: | [Qt] NPAPI: Excessive timer usage and high CPU load | ||
---|---|---|---|
Product: | WebKit | Reporter: | Firuz Kosimov <firuzkosimov> |
Component: | Plug-ins | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | benjamin, davidtlwong, hephooey_dev, ismail, laszlo.gombos, tonikitoo |
Priority: | P2 | Keywords: | Performance, Qt, QtTriaged |
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | |||
Bug Blocks: | 35962 |
Firuz Kosimov
I use qtwebkit 4.5 on my application and qtwebkit 4.5 supports flash plugin. When I enable flash plugin and navigate to a web-page with flash (youtube.com or any other with flash banner) the cpu load jumps up to 40-70% and the process-detail column "page fault delta" goes 30,000-60,000 every second. The demo-browser that is shipped with qt 4.5 has the same problem.
The steps to reproduce:
1)install qt 4.5
2)launch demo-browser from examples (notice cpu-load doesnt stay steadily when you navigate to pages without flash)
3)navigate to youtube.com
4)The cpu usage jumps to 40-70% and it doesnt go down. "page fault delta" in the process-detail column of task manager goes to 30,000-60,000 and stays at such pace.
I guess the cpu load and "page fault delta" should not stay up that high during viewing web-pages with flash elements.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
David T. L. Wong
I experience this problem too.
Using Qt 4.6 and MSVC2008 on Windows XP.
Webkit source is svn trunk r53272.
It seems there are too many timer event.
I modified SharedTimerQt::start() in WebCore/platform/qt/SharedTimerQt.cpp to:
void SharedTimerQt::start(double fireTime)
{
static int zero_interval_count = 0;
double interval = fireTime - currentTime();
unsigned int intervalInMS;
if (interval < 0) {
intervalInMS = 0;
} else {
interval *= 1000;
intervalInMS = (unsigned int)interval;
}
if (intervalInMS == 0) {
zero_interval_count++;
if ((zero_interval_count % 10000) == 0) {
printf("zero_interval_count = %d, time = %f\n", zero_interval_count, currentTime());
}
}
m_timer.start(intervalInMS, this);
}
on simple flash that only display a digital clock,
It records 10,000 m_timer.start() calls, with interval equals zero, in 0.536 second
on http://www.adobe.com/flashplatform/ ,
It records 10,000 m_timer.start() calls, with interval equals zero, in 3.165 second
Ismail Donmez
I also see this but without any plugin, one such a page is http://en.m.wikipedia.org/wiki?search=dinasour
Benjamin Poulain
*** Bug 35777 has been marked as a duplicate of this bug. ***
Jocelyn Turcotte
=== Bulk closing of Qt bugs ===
If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.
If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.