RDF, ending the myth of multithreading?

Axel Hecht axel at pike.org
Sat, 14 May 2005 18:49:00 +0200


I have https://bugzilla.mozilla.org/show_bug.cgi?id=291123 about 
removing the unused multithreading macros from the RDF code, namely 
nsInMemoryDataSource. That's the only place the relevant define shows 
up, see http://lxr.mozilla.org/seamonkey/search?string=MOZ_THREADSAFE_RDF.
It is somewhat in the way of the redesign of the RDF APIs and hasn't 
been built for ages.

The core point about the new APIs is to get rid of the snapshots that we 
create during reading the hashtables. To do that, we introduce a 
callback, which is called for each triple (-subset). I want to allow 
further read operations from this callback, but I have to block write 
ops. With multithreading, the blocking of writes had to be synched in 
thread-local storage, being even more costly than it would be right now. 
Within the single-thread model though, we can speed up a few common 
operations, esp during serialisation of RDF/XML.

I wanted to give you a chance to veto, and I have a sr request on 
brendan as a platform-approval request.