This commit is contained in:
kamhung
2015-11-12 14:19:36 +08:00
parent e64a92c1d2
commit c19c5f026f
2 changed files with 3 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ import org.w3c.dom.*;
* 进程启动类程序启动后读取application.xml,进行classpath扫描动态加载Service与Servlet
* 优先加载所有SNCP协议的服务 再加载其他协议服务,
* 最后进行Service、Servlet与其他资源之间的依赖注入。
*
*
*
* @author zhangjx
*/
@@ -201,6 +201,7 @@ public final class Application {
}
public void init() throws Exception {
System.setProperty("java.util.concurrent.ForkJoinPool.common.parallelism", "" + Runtime.getRuntime().availableProcessors() * 16);
System.setProperty("convert.bson.pool.size", "128");
System.setProperty("convert.json.pool.size", "128");
System.setProperty("convert.bson.writer.buffer.defsize", "4096");

View File

@@ -395,7 +395,7 @@ public final class EntityCache<T> {
}
public boolean isParallel() {
return this.list.size() > 1024 * 1024;
return this.list.size() >= 1024 * 64;
}
private Stream<T> listStream() {