> From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Andi Vajda > Sent: Monday, March 19, 2007 11:02 AM > > On Mon, 12 Mar 2007, Ofer Nave wrote: > > > Unfortunately, due to Python threads being user-level threads, it > > seems my script doesn't see any performance gains from the > second CPU > > (I/O isn't much of a bottleneck since I have enough spare > RAM on the > > box to cache the entire filesystem). > > Python threads are normally real OS threads. While the python > interpreter is running, though, python holds a Global > Interpreter Lock (GIL). Whenever PyLucene calls out of Python > into the compiled Lucene code (looks like C++ to > Python) the GIL is released for the full threading > concurrency afforded by Java.
What if I had subclassed the Query or Similarity class? Wouldn't the Java searcher constantly be calling back into my Python code while executing the query, thereby dramatically reducing the portion of time that is fully concurrent? -ofer _______________________________________________ pylucene-dev mailing list [email protected] http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
