diff --git a/README.md b/README.md
index ebba173e..3a22ff64 100644
--- a/README.md
+++ b/README.md
@@ -41,7 +41,7 @@ Java解析、生成Excel比较有名的框架有Apache poi、jxl。但他们都
com.alibaba
easyexcel
- 3.0.3
+ 3.0.4
```
diff --git a/pom.xml b/pom.xml
index c5aec18c..89f4c341 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
com.alibaba
easyexcel
- 3.0.3
+ 3.0.4
jar
easyexcel
diff --git a/src/main/java/com/alibaba/excel/cache/Ehcache.java b/src/main/java/com/alibaba/excel/cache/Ehcache.java
index a5250900..b7b542ee 100644
--- a/src/main/java/com/alibaba/excel/cache/Ehcache.java
+++ b/src/main/java/com/alibaba/excel/cache/Ehcache.java
@@ -24,7 +24,7 @@ import org.ehcache.config.units.MemoryUnit;
*/
@Slf4j
public class Ehcache implements ReadCache {
- public static final int BATCH_COUNT = 1000;
+ public static final int BATCH_COUNT = 100;
/**
* Key index
*/
diff --git a/src/main/java/com/alibaba/excel/metadata/csv/CsvSheet.java b/src/main/java/com/alibaba/excel/metadata/csv/CsvSheet.java
index 79331677..725addbc 100644
--- a/src/main/java/com/alibaba/excel/metadata/csv/CsvSheet.java
+++ b/src/main/java/com/alibaba/excel/metadata/csv/CsvSheet.java
@@ -85,7 +85,7 @@ public class CsvSheet implements Sheet, Closeable {
public CsvSheet(CsvWorkbook csvWorkbook, Appendable out) {
this.csvWorkbook = csvWorkbook;
this.out = out;
- this.rowCacheCount = 3000;
+ this.rowCacheCount = 100;
this.csvFormat = CSVFormat.DEFAULT;
this.lastRowIndex = -1;
}
diff --git a/src/main/java/com/alibaba/excel/read/listener/PageReadListener.java b/src/main/java/com/alibaba/excel/read/listener/PageReadListener.java
index c692bf10..0795a9e4 100644
--- a/src/main/java/com/alibaba/excel/read/listener/PageReadListener.java
+++ b/src/main/java/com/alibaba/excel/read/listener/PageReadListener.java
@@ -17,7 +17,7 @@ public class PageReadListener implements ReadListener {
/**
* Single handle the amount of data
*/
- public static int BATCH_COUNT = 3000;
+ public static int BATCH_COUNT = 100;
/**
* Temporary storage of data
*/
diff --git a/src/test/java/com/alibaba/easyexcel/test/core/large/LargeDataTest.java b/src/test/java/com/alibaba/easyexcel/test/core/large/LargeDataTest.java
index a438a2ee..c7f202e5 100644
--- a/src/test/java/com/alibaba/easyexcel/test/core/large/LargeDataTest.java
+++ b/src/test/java/com/alibaba/easyexcel/test/core/large/LargeDataTest.java
@@ -59,7 +59,7 @@ public class LargeDataTest {
public void t02Fill() {
ExcelWriter excelWriter = EasyExcel.write(fileFill07).withTemplate(template07).build();
WriteSheet writeSheet = EasyExcel.writerSheet().build();
- for (int j = 0; j < 100; j++) {
+ for (int j = 0; j < 5000; j++) {
excelWriter.fill(data(), writeSheet);
LOGGER.info("{} fill success.", j);
}
@@ -72,7 +72,7 @@ public class LargeDataTest {
long start = System.currentTimeMillis();
ExcelWriter excelWriter = EasyExcel.write(fileCsv).build();
WriteSheet writeSheet = EasyExcel.writerSheet().build();
- for (int j = 0; j < 100; j++) {
+ for (int j = 0; j < 5000; j++) {
excelWriter.write(data(), writeSheet);
LOGGER.info("{} write success.", j);
}
@@ -97,7 +97,7 @@ public class LargeDataTest {
long start = System.currentTimeMillis();
excelWriter = EasyExcel.write(fileWrite07, LargeData.class).build();
writeSheet = EasyExcel.writerSheet().build();
- for (int j = 0; j < 100; j++) {
+ for (int j = 0; j < 5000; j++) {
excelWriter.write(data(), writeSheet);
LOGGER.info("{} write success.", j);
}
@@ -130,7 +130,7 @@ public class LargeDataTest {
private List data() {
List list = new ArrayList<>();
- int size = i + 5000;
+ int size = i + 100;
for (; i < size; i++) {
LargeData largeData = new LargeData();
list.add(largeData);
diff --git a/src/test/java/com/alibaba/easyexcel/test/demo/read/CellDataDemoHeadDataListener.java b/src/test/java/com/alibaba/easyexcel/test/demo/read/CellDataDemoHeadDataListener.java
index 53e0bf68..aba35665 100644
--- a/src/test/java/com/alibaba/easyexcel/test/demo/read/CellDataDemoHeadDataListener.java
+++ b/src/test/java/com/alibaba/easyexcel/test/demo/read/CellDataDemoHeadDataListener.java
@@ -3,13 +3,13 @@ package com.alibaba.easyexcel.test.demo.read;
import java.util.ArrayList;
import java.util.List;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.fastjson.JSON;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
* 读取头
*
@@ -18,9 +18,9 @@ import com.alibaba.fastjson.JSON;
public class CellDataDemoHeadDataListener extends AnalysisEventListener {
private static final Logger LOGGER = LoggerFactory.getLogger(CellDataDemoHeadDataListener.class);
/**
- * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收
+ * 每隔5条存储数据库,实际使用中可以100条,然后清理list ,方便内存回收
*/
- private static final int BATCH_COUNT = 5;
+ private static final int BATCH_COUNT = 100;
List list = new ArrayList();
@Override
diff --git a/src/test/java/com/alibaba/easyexcel/test/demo/read/ConverterDataListener.java b/src/test/java/com/alibaba/easyexcel/test/demo/read/ConverterDataListener.java
index d343964d..d4717468 100644
--- a/src/test/java/com/alibaba/easyexcel/test/demo/read/ConverterDataListener.java
+++ b/src/test/java/com/alibaba/easyexcel/test/demo/read/ConverterDataListener.java
@@ -3,13 +3,13 @@ package com.alibaba.easyexcel.test.demo.read;
import java.util.ArrayList;
import java.util.List;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.fastjson.JSON;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
* 模板的读取类
*
@@ -18,7 +18,7 @@ import com.alibaba.fastjson.JSON;
public class ConverterDataListener extends AnalysisEventListener {
private static final Logger LOGGER = LoggerFactory.getLogger(ConverterDataListener.class);
/**
- * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收
+ * 每隔5条存储数据库,实际使用中可以100条,然后清理list ,方便内存回收
*/
private static final int BATCH_COUNT = 5;
List list = new ArrayList();
diff --git a/src/test/java/com/alibaba/easyexcel/test/demo/read/DemoDataListener.java b/src/test/java/com/alibaba/easyexcel/test/demo/read/DemoDataListener.java
index 6cc1ecef..4764f717 100644
--- a/src/test/java/com/alibaba/easyexcel/test/demo/read/DemoDataListener.java
+++ b/src/test/java/com/alibaba/easyexcel/test/demo/read/DemoDataListener.java
@@ -19,9 +19,9 @@ import org.slf4j.LoggerFactory;
public class DemoDataListener extends AnalysisEventListener {
private static final Logger LOGGER = LoggerFactory.getLogger(DemoDataListener.class);
/**
- * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收
+ * 每隔5条存储数据库,实际使用中可以100条,然后清理list ,方便内存回收
*/
- private static final int BATCH_COUNT = 3000;
+ private static final int BATCH_COUNT = 100;
/**
* 缓存的数据
*/
diff --git a/src/test/java/com/alibaba/easyexcel/test/demo/read/DemoExceptionListener.java b/src/test/java/com/alibaba/easyexcel/test/demo/read/DemoExceptionListener.java
index e4f9571a..b6dfdb4e 100644
--- a/src/test/java/com/alibaba/easyexcel/test/demo/read/DemoExceptionListener.java
+++ b/src/test/java/com/alibaba/easyexcel/test/demo/read/DemoExceptionListener.java
@@ -20,7 +20,7 @@ import com.alibaba.fastjson.JSON;
public class DemoExceptionListener extends AnalysisEventListener {
private static final Logger LOGGER = LoggerFactory.getLogger(DemoExceptionListener.class);
/**
- * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收
+ * 每隔5条存储数据库,实际使用中可以100条,然后清理list ,方便内存回收
*/
private static final int BATCH_COUNT = 5;
List list = new ArrayList();
diff --git a/src/test/java/com/alibaba/easyexcel/test/demo/read/DemoHeadDataListener.java b/src/test/java/com/alibaba/easyexcel/test/demo/read/DemoHeadDataListener.java
index 49800297..61bd834b 100644
--- a/src/test/java/com/alibaba/easyexcel/test/demo/read/DemoHeadDataListener.java
+++ b/src/test/java/com/alibaba/easyexcel/test/demo/read/DemoHeadDataListener.java
@@ -4,15 +4,14 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-import org.junit.Assert;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.excel.exception.ExcelDataConvertException;
import com.alibaba.fastjson.JSON;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
* 读取头
*
@@ -21,7 +20,7 @@ import com.alibaba.fastjson.JSON;
public class DemoHeadDataListener extends AnalysisEventListener {
private static final Logger LOGGER = LoggerFactory.getLogger(DemoHeadDataListener.class);
/**
- * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收
+ * 每隔5条存储数据库,实际使用中可以100条,然后清理list ,方便内存回收
*/
private static final int BATCH_COUNT = 5;
List list = new ArrayList();
diff --git a/src/test/java/com/alibaba/easyexcel/test/demo/read/IndexOrNameDataListener.java b/src/test/java/com/alibaba/easyexcel/test/demo/read/IndexOrNameDataListener.java
index 6c13d683..b8526ef1 100644
--- a/src/test/java/com/alibaba/easyexcel/test/demo/read/IndexOrNameDataListener.java
+++ b/src/test/java/com/alibaba/easyexcel/test/demo/read/IndexOrNameDataListener.java
@@ -3,13 +3,13 @@ package com.alibaba.easyexcel.test.demo.read;
import java.util.ArrayList;
import java.util.List;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.fastjson.JSON;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
* 模板的读取类
*
@@ -18,7 +18,7 @@ import com.alibaba.fastjson.JSON;
public class IndexOrNameDataListener extends AnalysisEventListener {
private static final Logger LOGGER = LoggerFactory.getLogger(IndexOrNameDataListener.class);
/**
- * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收
+ * 每隔5条存储数据库,实际使用中可以100条,然后清理list ,方便内存回收
*/
private static final int BATCH_COUNT = 5;
List list = new ArrayList();
diff --git a/src/test/java/com/alibaba/easyexcel/test/demo/read/NoModelDataListener.java b/src/test/java/com/alibaba/easyexcel/test/demo/read/NoModelDataListener.java
index a48d3fca..761b50f4 100644
--- a/src/test/java/com/alibaba/easyexcel/test/demo/read/NoModelDataListener.java
+++ b/src/test/java/com/alibaba/easyexcel/test/demo/read/NoModelDataListener.java
@@ -4,13 +4,13 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.fastjson.JSON;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
* 直接用map接收数据
*
@@ -19,7 +19,7 @@ import com.alibaba.fastjson.JSON;
public class NoModelDataListener extends AnalysisEventListener