TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How fast is your Spring Boot startup time?

3 点作者 monroewalker将近 3 年前
Assuming you've already bootRun or compiled once and are starting the app again, what's your startup time? I'm currently working on an app where it's taking ~30 seconds to get started and wondering what the lower bound could look like with the proper optimizations. I'm generally happy with Spring Boot + Kotlin but find it hard to cope with the turn around time for updates to take effect. With spring boot dev tools enabled, the hot reloading seems to take about 10 seconds. Might not be all that long objectively or compared to how long it used to take, but it certainly feels slow relative to backends in JS, Python, Ruby, etc.

3 条评论

atwood22将近 3 年前
Have you tried profiling the app? What is taking so long to initialize? You could try creating an empty Spring Boot application to see what the lower bound is. One thing I've found with with DI is that precompiled solutions like Dagger are way faster than something like Spring's DI.
评论 #31968934 未加载
mdmglr将近 3 年前
In a code base I once maintained there where PostConstruct/InitializingBean/ApplicationListener bean's that took quite a bit of time making maps for use as caches. This contributed to quite a bit of time. So I would look at any misbehaving beans.
oweiler将近 3 年前
Are you using Hibernate?
评论 #31968936 未加载