Adi, btw, you should probably use slicing to return up to 20 items from a SQL result object (it will be most efficient way). If some get removed because they are merged, it still is not too bad to return eg. 17 items, compared to serializing all 1300 Person objects for some languages (like Spanish or French).
To do it, simply do something like:
top_translators = self.context.translators[:20]
returned_translators = []
for translator in top_translators:
...
Adi, btw, you should probably use slicing to return up to 20 items from a SQL result object (it will be most efficient way). If some get removed because they are merged, it still is not too bad to return eg. 17 items, compared to serializing all 1300 Person objects for some languages (like Spanish or French).
To do it, simply do something like:
top_translators = self.context. translators[ :20] translators = []
returned_
for translator in top_translators:
...