Closed BobDu closed 9 months ago
优化了正式环境运行时的内存占用
Closed: #345 #383
对比了一下 发现 使用 tsup 编译后的 nodejs 应用启动就是会内存占用偏大一点。
tsup
nodejs
另外 使用 pnpm prod 启动和 直接使用 node build/index.js 启动占用的内存也不太一样。前者会多出来一个50MB左右内存消耗的父进程。
pnpm prod
node build/index.js
从这两个方向优化一下编译启动流程。实测下来内存占用可以从 200MB 优化至 70MB
tsc
esno
tsx
dependencies
devDependencies
eslint
require()
import
Someone is attempting to deploy a commit to a Personal Account owned by @Kerwin1202 on Vercel.
@Kerwin1202 first needs to authorize it.
Tested this PR. Works perfectly! Recommend to merge.
优化了正式环境运行时的内存占用
Closed: #345 #383
对比了一下 发现 使用
tsup
编译后的nodejs
应用启动就是会内存占用偏大一点。另外 使用
pnpm prod
启动和 直接使用node build/index.js
启动占用的内存也不太一样。前者会多出来一个50MB左右内存消耗的父进程。从这两个方向优化一下编译启动流程。实测下来内存占用可以从 200MB 优化至 70MB
tsup
编译 改为使用tsc
esno
升级为tsx
tsup
修复了一些后端服务中部分应该声明为dependencies
的依赖被错误定义至devDependencies
tsup
更新了eslint
工具链require()
导入语法为import