We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在ngbatis对模板引擎的使用中,有一个比较重的资源使用了懒加载的方式。 日志输出对应的是:nGql make up costs 370ms,如果想把这部分时间挪到服务启动时, 可以在项目中使用以下方式,提前完成资源加载:
@Bean public TextResolver textResolver(TextResolver resolver) { resolver.resolve("", Collections.emptyMap()); return resolver; }
另外还有可能耗时的环节发生在数据库的查询上,日志输出对应的是:query costs 1091ms 如果最小连接数为 0,那么也会在第一次查询时创建连接,也会比单纯的查询本身额外消耗一些时间: 可以让最小连接数大于0,从而在服务启动时,完成连接创建,减少初次查询耗时。
nebula: pool-config: min-conns-size: 1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
第一种情况,查询语句组装耗时
在ngbatis对模板引擎的使用中,有一个比较重的资源使用了懒加载的方式。
日志输出对应的是:nGql make up costs 370ms,如果想把这部分时间挪到服务启动时,
可以在项目中使用以下方式,提前完成资源加载:
第二种情况,执行查询的耗时
另外还有可能耗时的环节发生在数据库的查询上,日志输出对应的是:query costs 1091ms
如果最小连接数为 0,那么也会在第一次查询时创建连接,也会比单纯的查询本身额外消耗一些时间:
可以让最小连接数大于0,从而在服务启动时,完成连接创建,减少初次查询耗时。
The text was updated successfully, but these errors were encountered: