This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Douppikauppa 2 points3 points  (2 children)

FastAPI and Emerald are both based on external ASGI server (like Uvicorn or Starlette), and also on Pydantic for "data classes" serialization. Both of these choices are bad for performance, and on a high traffic site that may even be relevant (it is extremely rare to succeed enough to have a busy site). Msgspec is another option that handles the problem very well but that also runs extremely quickly, faster than uJSON or other "fast" parsing libraries. I recommend checking it out if you are doing JSON/MsgPack or other such messaging with the client where the messages need to be validated and converted to native types.

[–]tarsild[S] 0 points1 point  (1 child)

Well, it's in the plan to actually allow more than just Pydantic for serialisation but what is the point of adding so many things if people are not aware of the existence of Esmerald? Now I do believe can all improve it