>
> I am trying to get imdb data for multiple movies. I want to speed things
up, so I do this in 10 separate threads.
Each thread does this:

ia = imdb.IMDb()
ia.search_movie(moviename)

This leads to a timeout error in *every* thread. I also tried sharing the
ia variable across threads
(so that, there's 1 call to imdb.IMDb() but 10 calls to search_movie); this
also leads to timeouts.

I tried setting the timeout to infinity (ia.set_timeout(None)); then I get
the results from all threads but performance
is terribly slow! The total time is much greater than time taken for 1
movie.

I also tried this by using urllib in separate threads and connecting to
imdb pages of the respective movies. This takes as much time
as 1 call to the imdb page!

So, I guess imdbpy has some bug that's preventing me from parallelizing
using threads.
Any suggestions?

Thanks.
Ankur Dahiya
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Imdbpy-devel mailing list
Imdbpy-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-devel

Reply via email to