From what I can gather in the code for `CaseAPIResult`, this does one case lookup per case. I think it's a lot more efficient to get all the `case_ids` and then do something like

```python
cases = CommCareCase.view('_all_docs', keys=case_ids)
```
and then pass those cases in to `CaseAPIResult`.