[Xapian-tickets] [Xapian] #575: Mark "lightweight" functions/methods in API headers

Xapian nobody at xapian.org
Mon May 21 13:37:10 BST 2012


#575: Mark "lightweight" functions/methods in API headers
-------------------------+--------------------------------------------------
 Reporter:  olly         |       Owner:  olly     
     Type:  enhancement  |      Status:  new      
 Priority:  normal       |   Milestone:  1.3.x    
Component:  Library API  |     Version:  SVN trunk
 Severity:  normal       |    Keywords:           
Blockedby:               |    Platform:  All      
 Blocking:               |  
-------------------------+--------------------------------------------------
Description changed by olly:

Old description:

> In the Python bindings, we need to release the GIL (Global Interpreter
> Lock) while executing C++ functions/methods which can do significant
> work.  We currently do this for all methods, which adds an unnecessary
> overhead.
>
> In Liam's node.js wrappers, he wants to know which functions shouldn't
> block.
>
> This would probably be useful for some other bindings too.
>
> Both of these cases would be assisted by adding macro markers to the API
> headers for functions/methods which are "lightweight".  For the Python
> bindings we could extract these to ausefullyutomatically generate a SWIG
> interface file to tell SWIG not to drop the GIL for these.  And we could
> produce a list of the methods for human inspection for the node.js case.
>
> Obvious candidates are the version functions and get_description()
> methods.

New description:

 In the Python bindings, we need to release the GIL (Global Interpreter
 Lock) while executing C++ functions/methods which can do significant work.
 We currently do this for all methods, which adds an unnecessary overhead.

 In Liam's node.js wrappers, he wants to know which functions shouldn't
 block.

 This would probably be useful for some other bindings too.

 Both of these cases would be assisted by adding macro markers to the API
 headers for functions/methods which are "lightweight".  For the Python
 bindings we could extract these to automatically generate a SWIG interface
 file to tell SWIG not to drop the GIL for these.  And we could produce a
 list of the methods for human inspection for the node.js case.

 Obvious candidates are the version functions and get_description()
 methods.

--

-- 
Ticket URL: <http://trac.xapian.org/ticket/575#comment:2>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list