CPU time use from WordPress Javascript

Currently I have some significant problems with Javascript CPU use when editing my WordPress blog. Some operations take about 10 seconds to complete which involves Konqueror using 100% CPU time. Does anyone have any ideas how to solve this problem? Is there a web browser that pre-compiles Javascript for faster execution?

I am assuming that it’s Javascript at fault, because apart from that there’s nothing complex in the WordPress web pages.

This is an important issue for me as the Konqueror CPU use is the only thing that makes me want to use a faster computer. Apart from that my 3 year old Thinkpad should be able to last at least another couple of years. I recently had my keyboard replaced just before the warrantee ran out and would like to keep using it until I’ve worn out the new keyboard (I have worn out about 6 Thinkpad keyboards, thanks IBM/Lenovo for continually replacing them for me).

11 comments to CPU time use from WordPress Javascript

  • bill

    have you tried any other browsers? Do they exhibit the same issue?

  • I had the same problem with Firefox sometimes – no way to reproduce it here.
    Since Firefox the problem didn’t appear

  • bill gates

    you might try looking for a konqueror web developer plugin, where you should be able to edit the javascript. perhaps you can comment parts out until the problem goes away? or it might be better to add an alert before and after parts to measure the time between alerts.

  • etbe

    I had a similar problem when using Firefox/Iceweasel on Blogger. I have not tried using other browsers with WordPress.

    Editing the Javascript would require knowing how to write Javascript, which is something I don’t want to learn.

    PS Please don’t use the names of real people for commenting. A comment as “anon” or similar is better than “bill gates”.

  • Sebastian

    Are you using the tinyMCE WYSIWYG editor? If so, switch it off to see if it’s the cause. You could also just try out the editor from the site, again to establish whether it’s the cause of the problem. Which operations are taking so long?

  • KS

    Been using Firefox (Iceweasel with WP 2.2 and 2.2.1 and haven’t seen JS slowdowns.JS does use full CPU but that usage is in sharp peaks without any noticeable difference in UI handling. As Sebastian said, try switching off the tinyMCE editor and see if it makes a difference.

  • etbe

    I’m not using the WYSIWYG editor (I have configured it to be off and the editor I get doesn’t appear to be WYSIWYG). When I click on the “Write” option to create a new post Konqueror uses 100% CPU time for many seconds.

    JS using full CPU in a peak is more of a problem the slower your CPU is. My CPU is a 1.7GHz Pentium-M, something like 1/4 the speed of a modern CPU…

  • KS

    mine is P 1.9MHz, so not that different.

    What version of WP do you have installed? WP 2.2 came with widgets of its own. Could that be culprit?

  • etbe

    KS: Good point. I am using WordPress 2.2. How do I determine if this is the problem?

  • KS

    Russell, I just tested a WP install by editing a post and re-arranging the sections on the right side sections (in edit mode) with Konqueror. I didn’t see any slowdown or excessive usage of the processor for long time periods. I used WP 2.2.1 and Konqueror 3.5.7 (Debian Sid).

    PS: BTW, in Konqueror the WP post editing interface is the WYSIWYG but the simpler one (the one you get if you click to the code tab).

  • I have this problem also. I run Ubuntu Edgy, Konqueror 3.5.5. I can’t do any administrative work on my blog using Konqueror since, after I log on, I always get:
    “A script on this page is causing KHTML to freeze….”

    No problem using administering WP using Epiphany, Firefox, Opera, or even IE under wine.

    Shouldn’t have to give up WYSIWYG because of browser bugs. I like Konqueror text rendering, but Firefox is more robust.