I don't know why I didn't do this before, but it should be caching the objects for later use by getObjects. That should speed up scanning.