Use generators to avoid massive memory consumption when huge lists are being used:

```
        for batch in (objs[i:i + batch_size] 
                      for i in xrange(0, len(objs), batch_size)): 
```