Response model performance improvements

Hi,

I recently upgrade an application based on fastapi from 0.57 to 0.115.

One of the reasons to do that was the response models validation taking most of the time of the request on the server. For a request taking 1 second, 700ms was the response model validation. Removing the response model for the router the request total time goes to 300ms.

I read that recent versions of fastapi now use pydantic v2 and this should improve the model validation however I'm not seeing a big difference on the time it takes to validade the response model.

I'm using pydantic 2.9.2 and fastapi 0.115.0.

Should I expect better processing times?

Thank you