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
try (ExcelWriter excelWriter = EasyExcel .write(this.resultFilePath) .withTemplate(templateFilePath) .excelType(ExcelTypeEnum.XLSX) .build()) { WriteSheet build = EasyExcel.writerSheet(0).build(); List<RecruitmentMonthlyRecordsFillData> data = fillData(endDate); excelWriter.fill(data, build); }
代码如上所示 jdk8 -> jdk21 springboot2.7.8 -> springboot3.2.8 easyexcel3.1.1 -> 4.0.3
通过Arthas分析发现,在最后的com/alibaba/excel/ExcelWriter.close方法中,占用了大量内存。 继续向下分析发现 org/apache/poi/xssf/streaming/SXSSFWorkbook.copyStreamAndInjectWorksheet方法是性能损耗最大的地方
jdk21+springboot3.2.8+easyexcel4.0.3版本中 火焰图如下:
jdk1.8+springboot2.7.8+easyexcel4.0.3版本中 火焰图如下:
相同的版本,相同的代码,jdk和springboot的版本不同,两张火焰图里面的close方法差别很大
The text was updated successfully, but these errors were encountered:
@zhuangjiaju 复现成功,EasyExcel 版本 4.0.3 JDK21
Sorry, something went wrong.
No branches or pull requests
异常代码
问题描述
代码如上所示
jdk8 -> jdk21
springboot2.7.8 -> springboot3.2.8
easyexcel3.1.1 -> 4.0.3
通过Arthas分析发现,在最后的com/alibaba/excel/ExcelWriter.close方法中,占用了大量内存。
继续向下分析发现 org/apache/poi/xssf/streaming/SXSSFWorkbook.copyStreamAndInjectWorksheet方法是性能损耗最大的地方
依赖版本如下:
内存火焰图如下:
jdk21+springboot3.2.8+easyexcel4.0.3版本中 火焰图如下:
jdk1.8+springboot2.7.8+easyexcel4.0.3版本中 火焰图如下:
相同的版本,相同的代码,jdk和springboot的版本不同,两张火焰图里面的close方法差别很大
The text was updated successfully, but these errors were encountered: