How to optimize the procedural content generation

Procedural content generation is very common in AAA games. But we often face many performance issue like high number polygons. Epic has a matrix demo and Titan demo for the procedural generation, but they cannot be used in real game. Do we have some optimizing method for the PCG pipeline and assets?