[Project_owners] nsIThread and RDF

Luis Fernando Pardo lfern at dilmun.ls.fi.upm.es
Sat May 15 13:04:22 EDT 2004


  I am writing a simple XUL program in javascript that reads an XML
file, converts it to RDF format, and show it in XUL trees. The XML file
would be a bit large, and the RDF converstion takes, sometimes, a few
seconds. In this time the XUL window does not refresh so the user could
think that the programs hangs up. I have tried to make this conversion
function in a separate thread but the programm really hang up when this
nsIThread try to access the datasource object of the main thread (and if
I try to create the datasource object in the second thread, when I use
it on the main thread the program hangs too). I have seen that you must
use getProxyForObject for RDF objects, but if I do this the convertion
process takes very, very long time. Does anyone know if I have making
something wrong? Do you know same sample code that makes something like
this in javascript?

Thanks in advance for your help.

More information about the Project_owners mailing list