Performance
JStack is built on lightweight software such as Hono and Drizzle ORM for high performance out of the box.
To further optimize your app, JStack allows you to optimize bundle sizes and significantly reduce cold starts through built-in dynamic router and dependency loading.
Dynamically Loading Routers
Dynamically load routers using the dynamic()
function to maintain high performance when scaling to many routers. This approach reduces the initial bundle size & improves cold starts:
server/index.ts
Dynamic Imports in Procedures
JStack also supports dynamic imports within procedures for code splitting at the procedure level. Just like dynamically loading routers, this approach reduces the initial bundle size and can significantly improve cold starts:
server/routers/user-router.ts