Pixilab
Home › Companies › Show HN launch › Fastify's slow startup is an AJV problem – here's a drop-in fix

Fastify's slow startup is an AJV problem – here's a drop-in fix

Show HN: Fastify's slow startup is an AJV problem – here's a drop-in fix

Fastify's slow startup is an AJV problem – here's a drop-in fix is a business in show hn launch.

Profile

When using schemas, Fastify's startup speed is heavily affected by its schema compiler, AJV. AJV compiles every schema on startup. That's not the problem. The problem is it's quite slow, and they admit this themselves on their docs: https://ajv.js.org/guide/getting-started.html The more routes, the more complex your schemas, the longer you wait. For most people this isn't a bottleneck — schemas are relatively simple and routes are few. But for serverless functions, situations where every ms counts, or where you need to compile schemas on demand, it matters. Swapping the schema compiler fixes it. 100 routes, complex schemas (allOf/oneOf/anyOf/conditionals): JetValidator has removeAdditional,

Its activity falls under show hn launch; the profile below is assembled from public directory data.

Directory data places it at the Show HN launch stage.

SectorShow HN launch
StageShow HN launch

Website: ajv.js.org/guide/getting-started.html

Browse related

Emails and contact routes are reserved for registered members.
Create a free account