<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>24913</bug_id>
          
          <creation_ts>2009-03-28 11:52:31 -0700</creation_ts>
          <short_desc>[Qt] NPAPI: Excessive timer usage and high CPU load</short_desc>
          <delta_ts>2014-02-03 03:12:54 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Plug-ins</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Performance, Qt, QtTriaged</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>35962</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Firuz Kosimov">firuzkosimov</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>benjamin</cc>
    
    <cc>davidtlwong</cc>
    
    <cc>hephooey_dev</cc>
    
    <cc>ismail</cc>
    
    <cc>laszlo.gombos</cc>
    
    <cc>tonikitoo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>115691</commentid>
    <comment_count>0</comment_count>
    <who name="Firuz Kosimov">firuzkosimov</who>
    <bug_when>2009-03-28 11:52:31 -0700</bug_when>
    <thetext>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 &quot;page fault delta&quot; 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. &quot;page fault delta&quot; 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 &quot;page fault delta&quot; should not stay up that high during viewing web-pages with flash elements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>182686</commentid>
    <comment_count>1</comment_count>
    <who name="David T. L. Wong">davidtlwong</who>
    <bug_when>2010-01-20 02:28:58 -0800</bug_when>
    <thetext>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 &lt; 0) {
        intervalInMS = 0;
	} else {
        interval *= 1000;
        intervalInMS = (unsigned int)interval;
    }

	if (intervalInMS == 0) {
		zero_interval_count++;
		if ((zero_interval_count % 10000) == 0) {
			printf(&quot;zero_interval_count = %d, time = %f\n&quot;, 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>204484</commentid>
    <comment_count>2</comment_count>
    <who name="Ismail Donmez">ismail</who>
    <bug_when>2010-03-26 03:30:30 -0700</bug_when>
    <thetext>I also see this but without any plugin, one such a page is http://en.m.wikipedia.org/wiki?search=dinasour</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>219418</commentid>
    <comment_count>3</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2010-04-30 03:12:42 -0700</bug_when>
    <thetext>*** Bug 35777 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>975010</commentid>
    <comment_count>4</comment_count>
    <who name="Jocelyn Turcotte">jturcotte</who>
    <bug_when>2014-02-03 03:12:54 -0800</bug_when>
    <thetext>=== 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.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>