2015-03-08, 08:37
I'm using requests lib in my add-on, but there is a problem with import time of library.
with my laptop (core i7 8gb ram) it's taking beetween 0.85s and 1.10s to import it. (average of 1 second)
In my Raspberry Pi model B is taking 4.36 seconds!
This is the code to test it:
addon.xml:
this 4+ seconds plus the time to fetch http data makes navigation uncomfortable.
could anyone explain me what I'm doing wrong? or what is happening?
with my laptop (core i7 8gb ram) it's taking beetween 0.85s and 1.10s to import it. (average of 1 second)
In my Raspberry Pi model B is taking 4.36 seconds!
This is the code to test it:
Code:
import timeit
start = timeit.default_timer()
import requests
print 'request lib time: %.2fs' % (timeit.default_timer() - start)
addon.xml:
Code:
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.requests" version="2.4.3" />
</requires>
this 4+ seconds plus the time to fetch http data makes navigation uncomfortable.
could anyone explain me what I'm doing wrong? or what is happening?