michardy / sources-bot

Bot that identifies other sources of news for a story.
0 stars 0 forks source link

What is caching doing? #25

Closed michardy closed 6 years ago

michardy commented 6 years ago

Caching (excluding save time) makes things slower

time
pre-cache runtime: 0:02:53.564976
post-cache runtime: 0:02:56.443956

requests are about the same: screenshot_2018-05-21_21-28-43

michardy commented 6 years ago

Problem appears to be line 503:

for k in sources:
    k.update()

new times:

invalid fresh
time 0:03:25.742677 0:00:13.215267
API calls 1114 19

Fixed