Hi Ken,
I see you are only adding one findClause for the FormattedID. I think what may happen here is that since it's not narrowed down then the product is searching/finding this FormattedID per all object types.
You may already have, but please see this page:
Rally-Lookback-Toolkit/README.md at master · RallyTools/Rally-Lookback-Toolkit · GitHub
Check out this section:
"Add query clauses with query.addFindClause(field, value)
. To query for Defects in a project, add two clauses to the query:
query.addFindClause("_TypeHierarchy", "Defect"); query.addFindClause("Project", 1234); // replace 1234 with your project OID."
Can you see if you can narrow down the scope of the search by adding more findClauses, perhaps for the project, perhaps for the TypeHierarchy type etc.. - basically to limit the search/find scope.
I'm hoping this will make each iteration run faster.
Please let us know if that helped.
Sagi