Короче. Приписал к твоему коду свой:
ts = time.time()
with urlopen(URL) as bzstream:
decoded =
bz2.open(bzstream, 'r')
for record in decoded:
parsed = json.loads(record)
print("total time: %s" % (time.time() - ts))
И запустил. Один запуск:
% ./readtest.py
total time: 82.86467099189758
total time: 87.24534010887146
Второй:
% ./readtest.py
total time: 102.63068509101868
total time: 97.14632105827332