[alibaba/easyexcel]easyexcel首次导入解析慢

2024-05-10 323 views
7

使用的easyexcel,版本2.1.2。 在使用easyexcel上传解析的时候,连续调用多次,首次excel解析特别慢。 excel数据量大小为 171行,

16:08:08.323 [main] DEBUG c.a.e.m.property.ExcelHeadProperty - The initialization sheet/table 'ExcelHeadProperty' is complete , head kind is CLASS 16:08:08.343 [main] DEBUG c.a.e.context.AnalysisContextImpl - Initialization 'AnalysisContextImpl' complete 16:08:08.412 [main] DEBUG c.a.e.c.s.SimpleReadCacheSelector - Use map cache.size:10796 16:08:08.640 [main] DEBUG com.alibaba.excel.util.SheetUtils - The first is read by default. 16:08:08.640 [main] DEBUG c.a.e.m.property.ExcelHeadProperty - The initialization sheet/table 'ExcelHeadProperty' is complete , head kind is CLASS 16:08:08.640 [main] DEBUG c.a.e.context.AnalysisContextImpl - Began to read:ReadSheetHolder{sheetNo=0, sheetName='表格'} com.alibaba.excel.read.metadata.holder.ReadSheetHolder@1cd5639 数据处理完毕 耗时:427 171 test开始处理上传 16:08:08.736 [main] DEBUG c.a.e.m.property.ExcelHeadProperty - The initialization sheet/table 'ExcelHeadProperty' is complete , head kind is CLASS 16:08:08.736 [main] DEBUG c.a.e.context.AnalysisContextImpl - Initialization 'AnalysisContextImpl' complete 16:08:08.766 [main] DEBUG c.a.e.c.s.SimpleReadCacheSelector - Use map cache.size:10796 16:08:08.785 [main] DEBUG com.alibaba.excel.util.SheetUtils - The first is read by default. 16:08:08.785 [main] DEBUG c.a.e.m.property.ExcelHeadProperty - The initialization sheet/table 'ExcelHeadProperty' is complete , head kind is CLASS 16:08:08.785 [main] DEBUG c.a.e.context.AnalysisContextImpl - Began to read:ReadSheetHolder{sheetNo=0, sheetName='表格'} com.alibaba.excel.read.metadata.holder.ReadSheetHolder@f283e1 数据处理完毕 耗时:59 171

回答

3

这个是poi的问题 我到时候看下 能否在启动的时候热加载解决

8

碰到同样的问题,首次加载比较慢,后续的处理会比较快。现在有什么方案可以解决这个吗? 版本:

<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>easyexcel</artifactId>
    <version>3.1.1</version>
</dependency>
1

这个是poi的问题 我到时候看下 能否在启动的时候热加载解决

请问现在有解决方案了吗 @zhuangjiaju