Re: Long running functions in javascript?

Axel Hecht <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xpcom
Organization Institute of Mathematics, Section 2
Message-ID <[email protected]>
Peter Wilson wrote:
> 
> Adam,
> 
> Thanks for the reply.
> 
> I am already using an async load of the document using document load.
> The trouble starts once I try to process the document before displaying
> it. (Axel recently posted an XSL script which is doing a similar thing
> that I am doing in JS).
Jonas did, I just rant.

> 
> The document load takes about 3 seconds the document processing takes
> just over a minute. Unfortunately I can't tack my processing onto the
> same thread as the document load. So that the callback only occurs when
> the deed is done.
> 
> The alternative is to use XPCOM magic to create a thread and proxies to
> communicate progress back to the UI thread.

Interesting topic, let's ask on dom, too.

Is it safe to create DOM content on a non-UI thread?

I'm afraid not.

Axel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.