Bug 113921 - javascript rendering very slow
Summary: javascript rendering very slow
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: 3.4.2
Platform: Mandriva RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-05 22:26 UTC by Jonathan Hutchins
Modified: 2008-05-13 02:44 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Hutchins 2005-10-05 22:26:36 UTC
Version:            (using KDE KDE 3.4.2)
Installed from:    Mandriva RPMs

Javascript rendering has always been very slow and used an extreme amount of CPU - witness the many bug reports.  Although these performance bugs are marked "Resolved", upgrading to 3.4.2 has resulted in even SLOWER rendering - for instance, the javascript radar loops on Intellicast (http://www.intellicast.com/Local/USLocalWide.asp?loc=kmci&seg=LocalWeather&prodgrp=SevereWeather&product=1kmStormWatchLoop&prodnav=none&pid=none)
are so slow that they break up and become meaningless.  Mozilla-Firefox renders these pages smoothly.
Comment 1 George Staikos 2005-10-05 23:02:08 UTC
 Seems fine to me.  Also note that it's almost certainly not JS related, even 
though that's what drives it.
Comment 2 Jonathan Hutchins 2005-10-06 05:42:08 UTC
On Wednesday 05 October 2005 16:02, George Staikos wrote:

>  Seems fine to me.  Also note that it's almost certainly not JS related,
> even though that's what drives it.


Ok, where do you suggest I start debugging?  Why does Firefox render it just 
fine?

I did check a javascript that used to take close to 100% CPU at 
http://moprairie.org, and it now runs jerkily but doesn't swamp the system.
Comment 3 Yves Glodt 2005-11-01 23:56:30 UTC
There is definately room for improvement in js...

FYI, there is a nice js benchmark page at this site:
http://www.24fun.com/downloadcenter/benchjs/

Here are the results from my box:
(Athlon 2200 (1.8GHz), 512MB, Debian unstable, kernel 2.6.14, KDE 3.4.2)

Opera 9.0 Preview1:
12.25 seconds

Firefox 1.5b2:
15.81 seconds

Firefox 1.0.7:
41.17 seconds

IE6 (running in wine 0.9):
42.80 seconds (self-summed from different results as result page fails to open)

Konqueror 3.4.2:
70.44 seconds
Comment 4 Yves Glodt 2005-11-15 20:02:31 UTC
The same test on the same box, but using konqueror from KDE 3.5rc1 (compiled 
with konstruct) completes in 51.48 seconds now, so it's almost 30% faster now.
Comment 5 Maksim Orlovich 2005-11-15 20:14:23 UTC
that benchmark is mostly nonsense when it comes to actually measuring JavaScript speed ;-) [though it did help me find one problem you're seeing in the 30%]. You can get a huge speed up by e.g. disabling setting of window.status from JavaScript

Comment 6 Philip Rodrigues 2006-09-06 15:37:35 UTC
Jonathan, does the problem you're seeing still exist in KDE 3.5?
Comment 7 Jonathan Hutchins 2006-09-06 17:06:31 UTC
On Wednesday 06 September 2006 08:37, Philip Rodrigues wrote:
[bugs.kde.org quoted mail]

I'm currently running 3.5.3, and yes, there's still a problem.

One of the best tests for this is the intellicast.com radar loop maps 
( http://www.intellicast.com/IcastPage/LoadPage.aspx?loc=usa&seg=LocalWeather&prodgrp=RadarImagery&product=RadarLoop&prodnav=none&pid=none )
(That's gonna loop, so: http://tinyurl.com/9vxtw )

Even on a blank regional map (nothing on radar this morning in the mid-west), 
it will bog the system down so that mouse clicks are slow, etc.  If I load it 
in Firefox it renders much better and doesn't seem to load the system like 
that.
Comment 8 Daniel Hahler 2006-09-20 03:07:54 UTC
I cannot confirm with 3.5.4, nvidia driver and nVidia GT 6600 card on AMD64 3000+, Ubuntu Dapper.
Comment 9 Jonathan Hutchins 2006-09-20 17:23:31 UTC
On Tuesday 19 September 2006 20:07, dAniel hAhler wrote:

> http://bugs.kde.org/show_bug.cgi?id=113921


> ------- Additional Comments From kde-bugzilla thequod de  2006-09-20 03:07
> ------- I cannot confirm with 3.5.4, nvidia driver and nVidia GT 6600 card
> on AMD64 3000+, Ubuntu Dapper.


This is a Radeon RV100 QY [Radeon 7000/VE] on Mandriva 2006 with updates 
backported from cooker, but has been an ongoing problem through the last 
several releases.
Comment 10 Maksim Orlovich 2006-09-20 19:10:56 UTC
Can't confirm, please specify your version. And this has zilch to do with JavaScript: it's just an animated gif

Comment 11 Jonathan Hutchins 2006-09-20 19:39:28 UTC
On Wednesday 20 September 2006 12:10, Maksim Orlovich wrote:
> http://bugs.kde.org/show_bug.cgi?id=113921


> ------- Additional Comments From maksim kde org  2006-09-20 19:10 -------
> Can't confirm, please specify your version. And this has zilch to do with
> JavaScript: it's just an animated gif


Sorry about that, I figured that out after I opened the bug.  I'm currently 
running 3.5.3.

Today's national map 
( http://www.intellicast.com/IcastPage/LoadPage.aspx?loc=usa&seg=LocalWeather&prodgrp=RadarImagery&product=RadarLoop&prodnav=none&pid=none )
Animates just fine, but it doesn't have much detail.  On a local map with a 
lot of storm action, the rendering will be very jerky.
Comment 12 Philip Rodrigues 2007-01-07 13:18:04 UTC
Firefox and konqueror seem to have about the same CPU usage here when viewing that page. There are some other bugs about CPU usage on pages with large animated gifs
Comment 13 Jonathan Hutchins 2007-01-07 17:46:47 UTC
The original report used an animated GIF as the example, which was incorrect.  Both animated GIFs and javascript rendered poorly under this version, and both performed better under the then-current version of firefox.

Typically, performance bugs can be overcome with newer, more powerful hardware, and may not be noticeable on state-of-the-art systems.  On older, slower systems they become much more pronounced.

(Not being able to reproduce a bug that has 25 votes for it doesn't seem to be very meaningful.)
Comment 14 Mike Williams 2007-01-08 05:07:54 UTC
I can confirm this on KDE 3.5.5, compared to firefox 1.5. 

Opening the site in konqueror results in X cpu usage of ~12%, konq. CPU usage of ~13%. This is not the initial opening, but after the site has been open for about 3 minutes. Additionally, the cpu usage still happens even when konqueror is not visible.

Firefox, on the other hand, uses almost no CPU, under 1%.
Comment 15 A. Spehr 2008-04-16 03:36:04 UTC
With the recent gif speedups, can this bug be closed?
Comment 16 FiNeX 2008-05-08 22:52:09 UTC
I think we can't close it: with konqueror 3.5.9 I've loaded the suggestes websites in less than 10 seconds.

Instead konqueror 4 (from trunk, revision 804961) it crash with the following backtrace:

Application: Konqueror (konqueror), signal SIGSEGV
 [?1034hUsing host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0xb639a6d0 (LWP 25447)]
[KCrash handler]
#6  0xb4344a86 in KJS::Collector::markStackObjectsConservatively (
    start=0xbf180000, end=<value optimized out>)
    at /home/test/KDE4/kdesvn/kdelibs/kjs/collector.cpp:434
#7  0xb4344cf1 in KJS::Collector::markCurrentThreadConservatively ()
    at /home/test/KDE4/kdesvn/kdelibs/kjs/collector.cpp:508
#8  0xb4344d47 in KJS::Collector::markStackObjectsConservatively ()
    at /home/test/KDE4/kdesvn/kdelibs/kjs/collector.cpp:568
#9  0xb434522c in KJS::Collector::collect ()
    at /home/test/KDE4/kdesvn/kdelibs/kjs/collector.cpp:640
#10 0xb43457e5 in KJS::Collector::allocate (s=8)
    at /home/test/KDE4/kdesvn/kdelibs/kjs/collector.cpp:301
#11 0xb438847d in KJS::JSCell::operator new (size=8)
    at /home/test/KDE4/kdesvn/kdelibs/kjs/value.cpp:41
#12 0xb4388500 in KJS::jsString (s=@0x9153510)
    at /home/test/KDE4/kdesvn/kdelibs/kjs/value.cpp:192
#13 0xb4353c30 in KJS::PropertyNameNode::evaluate (this=0xbf180000)
    at /home/test/KDE4/kdesvn/kdelibs/kjs/nodes.cpp:794
#14 0xb434ac11 in KJS::PropertyListNode::evaluate (this=0x915a778, 
    exec=0xbf97c834) at /home/test/KDE4/kdesvn/kdelibs/kjs/nodes.cpp:734
#15 0xb43474d3 in KJS::ObjectLiteralNode::evaluate (this=0x918f8b0, 
    exec=0xbf97c834) at /home/test/KDE4/kdesvn/kdelibs/kjs/nodes.cpp:716
#16 0xb43555d9 in KJS::AssignDotNode::evaluate (this=0x918f8c0, 
    exec=0xbf97c834) at /home/test/KDE4/kdesvn/kdelibs/kjs/nodes.cpp:1817
#17 0xb434821e in KJS::ExprStatementNode::execute (this=0x918f8e0, 
    exec=0xbf97c834) at /home/test/KDE4/kdesvn/kdelibs/kjs/nodes.cpp:2168
#18 0xb434789b in KJS::SourceElementsNode::execute (this=0x8de5328, 
    exec=0xbf97c834) at /home/test/KDE4/kdesvn/kdelibs/kjs/nodes.cpp:2979
#19 0xb4347057 in KJS::BlockNode::execute (this=0x918faa8, exec=0xbf97c834)
    at /home/test/KDE4/kdesvn/kdelibs/kjs/nodes.cpp:2145
#20 0xb438d710 in KJS::Interpreter::evaluate (this=0x8866e60, 
    sourceURL=@0xbf97c924, startingLineNumber=1, code=0x90bf2e0, 
    codeLength=96288, thisV=0xb2a10000)
    at /home/test/KDE4/kdesvn/kdelibs/kjs/interpreter.cpp:499
#21 0xb438d826 in KJS::Interpreter::evaluate (this=0x8866e60, 
    sourceURL=@0xbf97c924, startingLineNumber=1, code=@0xbf97c928, 
    thisV=0xb2a10000)
    at /home/test/KDE4/kdesvn/kdelibs/kjs/interpreter.cpp:440
#22 0xb4720df2 in KJS::KJSProxyImpl::evaluate (this=0x8972a28, filename=
      {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 8882}, alloc = 0, size = 0, data = 0xb7369e5a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 176}, alloc = 0, size = 0, data = 0xb7369e6e, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0xbf97c9b8, static codecForCStrings = 0x0}, baseLine=1, 
    str=@0xbf97cc04, n=@0xbf97ca0c, completion=0xbf97c990)
    at /home/test/KDE4/kdesvn/kdelibs/khtml/ecma/kjs_proxy.cpp:157
#23 0xb44ff76d in KHTMLPart::executeScript (this=0x87aae80, 
    filename=@0xbf97ca28, baseLine=1, n=@0xbf97ca0c, script=@0xbf97cc04)
    at /home/test/KDE4/kdesvn/kdelibs/khtml/khtml_part.cpp:1184
#24 0xb457e7c9 in khtml::HTMLTokenizer::scriptExecution (this=0x88887c0, 
    str=@0xbf97cc04, scriptURL=@0xbf97cc08, baseLine=0)
    at /home/test/KDE4/kdesvn/kdelibs/khtml/html/htmltokenizer.cpp:466
#25 0xb4580bb6 in khtml::HTMLTokenizer::notifyFinished (this=0x88887c0)
    at /home/test/KDE4/kdesvn/kdelibs/khtml/html/htmltokenizer.cpp:1776
#26 0xb46ae24d in khtml::CachedScript::checkNotify (this=0x8deff48)
    at /home/test/KDE4/kdesvn/kdelibs/khtml/misc/loader.cpp:389
#27 0xb46b1b8c in khtml::CachedScript::data (this=0x8deff48, 
    buffer=@0x8e84184, eof=true)
    at /home/test/KDE4/kdesvn/kdelibs/khtml/misc/loader.cpp:381
#28 0xb46b17aa in khtml::Loader::slotFinished (this=0x87f4c70, job=0x8e690c0)
    at /home/test/KDE4/kdesvn/kdelibs/khtml/misc/loader.cpp:1398
#29 0xb46b87f7 in khtml::Loader::qt_metacall (this=0x87f4c70, 
    _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0xbf97ce1c)
    at /home/test/KDE4/kdesvn/build/kdelibs/khtml/loader.moc:129
#30 0xb72dc8fb in QMetaObject::activate (sender=0x8e690c0, 
    from_signal_index=<value optimized out>, to_signal_index=7, 
    argv=0xbf97ce1c)
    at /home/test/KDE4/kdesvn/qt-copy/src/corelib/kernel/qobject.cpp:3007
#31 0xb72dce52 in QMetaObject::activate (sender=0x8e690c0, m=0xb7c80988, 
    local_signal_index=3, argv=0xbf97ce1c)
    at /home/test/KDE4/kdesvn/qt-copy/src/corelib/kernel/qobject.cpp:3080
#32 0xb7b482a3 in KJob::result (this=0x8e690c0, _t1=0x8e690c0)
    at /home/test/KDE4/kdesvn/build/kdelibs/kdecore/kjob.moc:186
#33 0xb7b487b2 in KJob::emitResult (this=0x8e690c0)
    at /home/test/KDE4/kdesvn/kdelibs/kdecore/jobs/kjob.cpp:290
#34 0xb7d4517f in KIO::SimpleJob::slotFinished (this=0x8e690c0)
    at /home/test/KDE4/kdesvn/kdelibs/kio/kio/job.cpp:491
#35 0xb7d4cc93 in KIO::TransferJob::slotFinished (this=0x8e690c0)
    at /home/test/KDE4/kdesvn/kdelibs/kio/kio/job.cpp:961
#36 0xb7d4da6b in KIO::TransferJob::qt_metacall (this=0x8e690c0, 
    _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0xbf97d048)
    at /home/test/KDE4/kdesvn/build/kdelibs/kio/jobclasses.moc:336
#37 0xb72dc8fb in QMetaObject::activate (sender=0x88606e0, 
    from_signal_index=<value optimized out>, to_signal_index=8, argv=0x0)
    at /home/test/KDE4/kdesvn/qt-copy/src/corelib/kernel/qobject.cpp:3007
#38 0xb72dce52 in QMetaObject::activate (sender=0x88606e0, m=0xb7ef5384, 
    local_signal_index=4, argv=0x0)
    at /home/test/KDE4/kdesvn/qt-copy/src/corelib/kernel/qobject.cpp:3080
#39 0xb7e0c627 in KIO::SlaveInterface::finished (this=0x88606e0)
    at /home/test/KDE4/kdesvn/build/kdelibs/kio/slaveinterface.moc:161
#40 0xb7e102f7 in KIO::SlaveInterface::dispatch (this=0x88606e0, _cmd=104, 
    rawdata=@0xbf97d214)
    at /home/test/KDE4/kdesvn/kdelibs/kio/kio/slaveinterface.cpp:175
#41 0xb7e0cdad in KIO::SlaveInterface::dispatch (this=0x88606e0)
    at /home/test/KDE4/kdesvn/kdelibs/kio/kio/slaveinterface.cpp:90
#42 0xb7dfd20d in KIO::Slave::gotInput (this=0x88606e0)
    at /home/test/KDE4/kdesvn/kdelibs/kio/kio/slave.cpp:319
#43 0xb7dffc53 in KIO::Slave::qt_metacall (this=0x88606e0, 
    _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0xbf97d328)
    at /home/test/KDE4/kdesvn/build/kdelibs/kio/slave.moc:75
#44 0xb72dc8fb in QMetaObject::activate (sender=0x8866f68, 
    from_signal_index=<value optimized out>, to_signal_index=4, argv=0x0)
    at /home/test/KDE4/kdesvn/qt-copy/src/corelib/kernel/qobject.cpp:3007
#45 0xb72dce52 in QMetaObject::activate (sender=0x8866f68, m=0xb7ef2040, 
    local_signal_index=0, argv=0x0)
    at /home/test/KDE4/kdesvn/qt-copy/src/corelib/kernel/qobject.cpp:3080
#46 0xb7d0c7a7 in KIO::Connection::readyRead (this=0x8866f68)
    at /home/test/KDE4/kdesvn/build/kdelibs/kio/connection.moc:84
#47 0xb7d0e869 in KIO::ConnectionPrivate::dequeue (this=0x8866930)
    at /home/test/KDE4/kdesvn/kdelibs/kio/kio/connection.cpp:82
#48 0xb7d0e9f6 in KIO::Connection::qt_metacall (this=0x8866f68, 
    _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x8def6a0)
    at /home/test/KDE4/kdesvn/build/kdelibs/kio/connection.moc:72
#49 0xb72d781b in QMetaCallEvent::placeMetaCall (this=0x8e53150, 
    object=0x8866f68)
    at /home/test/KDE4/kdesvn/qt-copy/src/corelib/kernel/qobject.cpp:535
#50 0xb72d93d1 in QObject::event (this=0x8866f68, e=0x8e53150)
    at /home/test/KDE4/kdesvn/qt-copy/src/corelib/kernel/qobject.cpp:1137
#51 0xb6ad75dc in QApplicationPrivate::notify_helper (this=0x8663b60, 
    receiver=0x8866f68, e=0x8e53150)
    at /home/test/KDE4/kdesvn/qt-copy/src/gui/kernel/qapplication.cpp:3772
#52 0xb6ade5ce in QApplication::notify (this=0xbf97dcac, receiver=0x8866f68, 
    e=0x8e53150)
    at /home/test/KDE4/kdesvn/qt-copy/src/gui/kernel/qapplication.cpp:3366
#53 0xb78f0b0d in KApplication::notify (this=0xbf97dcac, receiver=0x8866f68, 
    event=0x8e53150)
    at /home/test/KDE4/kdesvn/kdelibs/kdeui/kernel/kapplication.cpp:311
#54 0xb72cb0a1 in QCoreApplication::notifyInternal (this=0xbf97dcac, 
    receiver=0x8866f68, event=0x8e53150)
    at /home/test/KDE4/kdesvn/qt-copy/src/corelib/kernel/qcoreapplication.cpp:583
#55 0xb72cb9f3 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, 
    event_type=0, data=0x863f288)
    at ../../include/QtCore/../../../../qt-copy/src/corelib/kernel/qcoreapplication.h:215
#56 0xb72cbb8d in QCoreApplication::sendPostedEvents (receiver=0x0, 
    event_type=0)
    at /home/test/KDE4/kdesvn/qt-copy/src/corelib/kernel/qcoreapplication.cpp:1091
#57 0xb72f1a1f in postEventSourceDispatch (s=0x8665790)
    at ../../include/QtCore/../../../../qt-copy/src/corelib/kernel/qcoreapplication.h:220
#58 0xb6574f88 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#59 0xb65784eb in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#60 0xb6578668 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#61 0xb72f1678 in QEventDispatcherGlib::processEvents (this=0x86486d8, flags=
      {i = -1080567352})
    at /home/test/KDE4/kdesvn/qt-copy/src/corelib/kernel/qeventdispatcher_glib.cpp:325
#62 0xb6b602a5 in QGuiEventDispatcherGlib::processEvents (this=0x86486d8, 
    flags={i = -1080567304})
    at /home/test/KDE4/kdesvn/qt-copy/src/gui/kernel/qguieventdispatcher_glib.cpp:204
#63 0xb72c982a in QEventLoop::processEvents (this=0xbf97da60, flags=
      {i = -1080567240})
    at /home/test/KDE4/kdesvn/qt-copy/src/corelib/kernel/qeventloop.cpp:149
#64 0xb72c99ea in QEventLoop::exec (this=0xbf97da60, flags={i = -1080567192})
    at /home/test/KDE4/kdesvn/qt-copy/src/corelib/kernel/qeventloop.cpp:196
#65 0xb72cbc4d in QCoreApplication::exec ()
    at /home/test/KDE4/kdesvn/qt-copy/src/corelib/kernel/qcoreapplication.cpp:845
#66 0xb6ad7457 in QApplication::exec ()
    at /home/test/KDE4/kdesvn/qt-copy/src/gui/kernel/qapplication.cpp:3304
#67 0xb804a39b in kdemain (argc=1, argv=0xbf97dff4)
    at /home/test/KDE4/kdesvn/kdebase/apps/konqueror/src/konqmain.cpp:232
#68 0x080488a2 in main (argc=0, argv=0x0)
    at /home/test/KDE4/kdesvn/build/kdebase/apps/konqueror/src/konqueror_dummy.cpp:3
#0  0xb8063424 in __kernel_vsyscall ()
Comment 17 FiNeX 2008-05-11 12:41:00 UTC
Sorry, I was using an unstable trunk version, I've recompiled and now It's not crashing anymore.
Both konqueror 4 and 3.5.9 render those pages without any speed problem.
Comment 18 A. Spehr 2008-05-13 02:44:09 UTC
Given that animated gifs run faster on my slow computer at home, then on my fast computer at work using a different browser, I think this bug can be closed. The dancing lady optical illusion is a good testcase of sorts: how fast do you see her spin?