it is really slow to extract the concept code from the output of the search function

classic Classic list List threaded Threaded
3 messages Options
Wei
Reply | Threaded
Open this post in threaded view
|

it is really slow to extract the concept code from the output of the search function

Wei
I would like to extract all the concept codes for the medical entity that I input. The code I was running is shown below.

# this step is pretty fast. The length of the temp list is around 200.
temp = CUI.search('pneumonia')

# however, this step takes a really long time (1 minute). It shouldn't be that slow.
concept_code_list = [x.name for x in temp]

I wonder how to speed up this process? Thank you!
Reply | Threaded
Open this post in threaded view
|

Re: it is really slow to extract the concept code from the output of the search function

Jiba
Administrator
Hi,

I tested and, indeed, it is slow... I've added additional SQL optimization in the development version of Owlready (on Bitbucket). With these, the search is almost immediate!

Enjoy,
Jiba
Wei
Reply | Threaded
Open this post in threaded view
|

Re: it is really slow to extract the concept code from the output of the search function

Wei
Thank you!!