Hello,
See comments in-line.

-Brian

Andi Vajda wrote:

On Wed, 13 Sep 2006, Jeffrey Harris wrote:

Hmm.  Perhaps PyLucene is manipulating the locale?  Lucene indexers are
certainly aware of locale.  Presumably it would be painful for
performance if PyLucene never released the GIL.

I'm not aware of anyone manipulating the locale 'behind the scenes'. Have you verified that the locale was indeed being manipulated ? The only place that I'm aware of where the locale is manipulated is where the --locale command line option is used.

When Chandler starts certain environmental variables are assigned to match the --locale flag. os.environ['LANGUAGE'] = locale
   os.environ['LC_ALL'] = locale
   os.environ['LC_MESSAGES'] = locale
   os.environ['LANG'] = locale

Also the Python locale, PyICU, and Wx Locales are set.

If PyLucene never released the GIL then the system would appear to hang temporarily when, for example, optimizing indexes which can take several seconds (or more).

Also, since one can write python extensions to PyLucene, it can call back into python. Because of this and because acquiring the GIL is not re-entrant - Phillip, correct me if I'm wrong - the GIL has to be acquired or released anytime the Python / C++ boundary is crossed.

Andi..

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev

--
Brian Kirsch Internationalization Architect / Mail Service Engineer
Open Source Applications Foundation
543 Howard Street 5th Floor
San Francisco, CA 94105
http://www.osafoundation.org

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev

Reply via email to