From 04c9402e3fc1ee5599e162e5eef8ea4893ad7824 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Thu, 4 Nov 2021 21:51:13 +0800 Subject: [PATCH] =?UTF-8?q?*=20=E8=B0=83=E6=95=B4=E8=AF=BB=E5=86=99?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=A4=A7=E5=B0=8F=EF=BC=8C=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E5=A4=A7=E6=89=B9=E9=87=8F=E5=86=99=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E4=BC=9Afull=20gc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/alibaba/excel/util/WorkBookUtil.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/alibaba/excel/util/WorkBookUtil.java b/src/main/java/com/alibaba/excel/util/WorkBookUtil.java index 71e1fd54..8fc7c210 100644 --- a/src/main/java/com/alibaba/excel/util/WorkBookUtil.java +++ b/src/main/java/com/alibaba/excel/util/WorkBookUtil.java @@ -26,8 +26,6 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook; */ public class WorkBookUtil { - public static final int ROW_ACCESS_WINDOW_SIZE = 500; - private WorkBookUtil() {} public static void createWorkBook(WriteWorkbookHolder writeWorkbookHolder) throws IOException { @@ -39,7 +37,7 @@ public class WorkBookUtil { if (writeWorkbookHolder.getInMemory()) { writeWorkbookHolder.setWorkbook(xssfWorkbook); } else { - writeWorkbookHolder.setWorkbook(new SXSSFWorkbook(xssfWorkbook, ROW_ACCESS_WINDOW_SIZE)); + writeWorkbookHolder.setWorkbook(new SXSSFWorkbook(xssfWorkbook)); } return; } @@ -47,7 +45,7 @@ public class WorkBookUtil { if (writeWorkbookHolder.getInMemory()) { workbook = new XSSFWorkbook(); } else { - workbook = new SXSSFWorkbook(ROW_ACCESS_WINDOW_SIZE); + workbook = new SXSSFWorkbook(); } writeWorkbookHolder.setCachedWorkbook(workbook); writeWorkbookHolder.setWorkbook(workbook);