Too many objects: Reducing memory overhead from Python instances