Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2005-03-28 13:55:46

adamp
Xinha Pro
Registered: 2005-03-14
Posts: 77

A script on this page is causing Mozilla to run slowly...

I'm having trouble with Xinha at the moment where something in the code is running away and eating up all the CPU resources, until I get the message 'A script on this page is causing Mozilla to run slowly....' and would I like to stop it running.

I can't think what's doing it, so has anyone else had this problem?

I'm using Xinha on multiple textareas, by adding this code next to each textarea:

<script language="JavaScript1.2">
xinha_editors[xinha_editors.length] = 'f3content';
</script>

For config, I have the following setup file (comments removed to keep it concise):

    xinha_editors = new Array();
    xinha_init    = null;
    xinha_config  = null;
    xinha_plugins = null;

    // This contains the names of textareas we will make into Xinha editors
    xinha_init = xinha_init ? xinha_init : function()
    {

      xinha_plugins = xinha_plugins ? xinha_plugins :
      [
       'CharacterMap',
       'FullScreen',
       'Linker',
       'SpellChecker',
       'Stylist',
       'SuperClean'
      ];

             // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  :)
             if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return;

      var tas = document.getElementsByTagName("textarea");
      
       xinha_config = new HTMLArea.Config();
       xinha_config.stylistLoadStylesheet('/siteadmin/wysiwyg.css');

      xinha_editors   = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);

      HTMLArea.startEditors(xinha_editors);
    }

    window.onload = xinha_init;

Any ideas?

Offline

#2 2005-03-28 14:16:35

CyberTron
Xinha Community Member
Registered: 2005-03-18
Posts: 25

Re: A script on this page is causing Mozilla to run slowly...

I did encounter a similar problem when I try to strip down the codes in full_example-body.html.

If I remember correctly, the culprit is this line of code "<script src="full_example.js"></script>" somewhere at the bottom.

Offline

#3 2005-03-28 14:19:45

adamp
Xinha Pro
Registered: 2005-03-14
Posts: 77

Re: A script on this page is causing Mozilla to run slowly...

Hmm, there's no reference to full_example.js anywhere in my code.

Offline

#4 2005-03-28 16:31:44

Yermo
Xinha Authority
From: College Park, Md, USA
Registered: 2005-02-13
Posts: 143
Website

Re: A script on this page is causing Mozilla to run slowly...

adamp wrote:

Any ideas?

You will see this if you are using the Linker plugin and the number of files being sent back is large. In my case I tried sending back a directory structure of about 1000 files (scan.php) .. and got that warning.

Separately I do notice Mozilla/FireFox slows down after a while of running Xinha. It would be cool if the Mozilla folks added the ability to list out the threads that are currently running so one might be able to see what's going on.


-----------------------------------------------------------------------------------------
Content Management with Business Intelligence      [url]http://www.formvista.com[/url]

Offline

#5 2005-03-28 16:48:54

adamp
Xinha Pro
Registered: 2005-03-14
Posts: 77

Re: A script on this page is causing Mozilla to run slowly...

Cheers, guess I'll have to play with scan.php earlier than planned then smile

Offline

#6 2005-04-02 04:49:05

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: A script on this page is causing Mozilla to run slowly...

Yes Linker is the main culprit for that.  It would be good if we could get a "progressive loading tree" happening (ie branches don't load until they are required).


James Sleeman

Offline

#7 2005-04-05 01:49:42

niko
Xinha Authority
From: Salzburg/Austria
Registered: 2005-02-14
Posts: 338

Re: A script on this page is causing Mozilla to run slowly...

should we create a ticket for this?


Niko

Offline

#8 2005-05-08 02:48:58

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: A script on this page is causing Mozilla to run slowly...

niko wrote:

should we create a ticket for this?

It would require writing a new tree (currently it uses "dTree" which I found somewhere).  But would be very nice.  Yes submit a ticket, but low priority enhancement smile


James Sleeman

Offline

#9 2005-05-09 09:49:47

niko
Xinha Authority
From: Salzburg/Austria
Registered: 2005-02-14
Posts: 338

Re: A script on this page is causing Mozilla to run slowly...

created one:
http://xinha.python-hosting.com/ticket/240

and modified scan.php to not use DOCUMENT_ROOT (instead __FILE__/../..)
http://xinha.python-hosting.com/changeset/133


Niko

Offline

Board footer

Powered by FluxBB