I checked out the FHIRPathResourceGenerator and I think I found a similar problem. In my case, it turned out the bottleneck was this invocation (which some times, but not always, took a lot of time)
I solved it, for now, by introducing a cache of resource definitions so that such invocation wasn't made for each resource generation.
I also tried to male the generator class non-generic and stateless so that the same instance can be used to generate multiple resources of different types.
I was wondering wether the generator was still under active development, we're using FHIR for a project and I find the fhir resource generator an awesome idea to simplify the usage of FHIR in our applications.
My use case is pretty similar to yours so I think we might be able to collaborate if you like.
Cheers to everyone on the group,
and thank you all for the awesome HAPI project!