<?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>39717</bug_id>
          
          <creation_ts>2010-05-26 03:06:20 -0700</creation_ts>
          <short_desc>very slow QVariant QWebFrame::evaluateJavaScript(const QString&amp; scriptSource) method.</short_desc>
          <delta_ts>2014-02-03 03:50:45 -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>WebKit Qt</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt, QtTriaged</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>stawel</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cmarcelo</cc>
    
    <cc>laszlo.gombos</cc>
    
    <cc>lypkiller</cc>
    
    <cc>sriram.yadavalli</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>230634</commentid>
    <comment_count>0</comment_count>
    <who name="">stawel</who>
    <bug_when>2010-05-26 03:06:20 -0700</bug_when>
    <thetext>Hi all,

I noticed that the QWebFrame method evaluateJavaScript(const QString&amp; scriptSource) is very slow.

consider this code:

class MyClass : public QWebFrame {

    void do() {
            QString script = QString(&quot; \
                      var main = document.getElementById(&apos;main&apos;); \
                      var newDivElement = document.createElement(&apos;div&apos;); \
                      main.appendChild(newDivElement); &quot;);

            //first loop execution time &gt; 5 minutes  !!!!!
            for(int i=0;i&lt;500;i++) 
                 evaluateJavaScript(script);

            //second loop execution time &lt; 0.1 sec
            for(int i=0;i&lt;500;i++) 
                 evaluateJavaScript(script + &quot;false;&quot;);
    }
}

it looks like that the calculation of the result (JSC::Bindings::convertValueToQVariant)
is very slow.
maybe a lazy calculation would be better.

Best Regards</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>235386</commentid>
    <comment_count>1</comment_count>
    <who name="Sriram">sriram.yadavalli</who>
    <bug_when>2010-06-08 11:16:57 -0700</bug_when>
    <thetext>Seems to be a performance issue.  Should be picked up.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>912369</commentid>
    <comment_count>2</comment_count>
    <who name="vincent">lypkiller</who>
    <bug_when>2013-07-28 19:17:02 -0700</bug_when>
    <thetext>as I see, the worst place of performance is tampering the html. eg.(JQUERY)
    $(&quot;&lt;a class=&apos;savetolocal&apos;&gt;SAVE&lt;/a&gt;&quot;).insertAfter(current);

i hope the qwebkit can offer some interface to extend the brower. like firefox&apos;s extension. user can excute extra script after loading page.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>975816</commentid>
    <comment_count>3</comment_count>
    <who name="Jocelyn Turcotte">jturcotte</who>
    <bug_when>2014-02-03 03:50:45 -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.

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>