Skip to content

perf: reuse compiled serializers - #99

Open
Prakhar007Pathak wants to merge 1 commit into
fastify:mainfrom
Prakhar007Pathak:perf/reuse-compiled-serializers
Open

Prakhar007Pathak wants to merge 1 commit into
fastify:mainfrom
Prakhar007Pathak:perf/reuse-compiled-serializers

Conversation

@Prakhar007Pathak

Copy link
Copy Markdown

Summary

  • Cache compiled serializers by schema object identity using a WeakMap.
  • Scope the cache to each serializer factory.
  • Add tests covering serializer reuse, cache isolation, and schemas duplicated in externalSchemas.

Testing

  • npm test — passed.
  • 14 unit tests passed.
  • 24 TypeScript assertions passed.
  • 100% code coverage.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant