Paper2D rendering performance from 4.19+

Hello,

Starting with Unreal 4.19 and onward the FPaperRenderSceneProxy was modified to use the DynamicMeshBuilder and this seems to cause some performance issues.

I have two screenshots below, one in 4.18.3 and one in 4.19 with the same scene, both rendering around 500 sprites. The loss of performance comes from the following function: STAT_PaperRenderSceneProxy_GetDynamicMeshElements.

Do you have any idea how I could improve the performance? I’ve looked in the FPaperRenderSceneProxy but it was heavily modified when transitioning from 4.18.3 to 4.19.

Scene in 4.18.3

Same scene in 4.19: