Server code takes more than 15 seconds to iterate over 1000 rows?

I tried out the alternatives to get_id() on a clone and got a small improvement.
I found them in this post:

Also, just retrieving the row id once and storing it in a variable within the for loop saved another second.

  for i in app_tables.article.search():
    rid = i._spec['id']
    ret[rid] = {'name':i['name'],'row_id':rid, 'id': i['id'],'no_discount': i['no_discount'],
                'price':i['price'],'ust':i['ust_dropdown'],'ks':i['in_kuehlraum']}