This one comes up quite a lot, but often the reason isn't what you might initially think. So, the first thing to check is - what's the source of the problem? Your file? Your code? Your environment? Or Apache POI?

(If you're here, you probably think it's Apache POI. However, it often isn't! A moderate laptop, with a decent but not excessive heap size, from a standing start, can normally read or write a file with 100 columns and 100,000 rows in under a couple of seconds, including the time to start the JVM).

Apache POI ships with a few programs and a few example programs, which can be used to do some basic performance checks. For testing file generation, the class to use is in the examples package, SSPerformanceTest. Run SSPerformanceTest with arguments of the writing type (HSSF, XSSF or SXSSF), the number rows, the number of columns, and if the file should be saved. If you can't run that with 50,000 rows and 50 columns in HSSF and SXSSF in under 3 seconds, and XSSF in under 10 seconds (and ideally all 3 in less than that!), then the problem is with your environment.

Next, use the example program ToCSV to try reading the a file in with HSSF or XSSF. Related is XLSX2CSV, which uses SAX parsing for .xlsx. Run this against both your problem file, and a simple one generated by SSPerformanceTest of the same size. If this is slow, then there could be an Apache POI problem with how the file is being processed (POI makes some assumptions that might not always be right on all files). If these tests are fast, then any performance problems are in your code!

poi大数据导入解决方法的更多相关文章

  1. .NET MVC Json()处理大数据异常解决方法

    [1-部分原文]: .NET MVC Json()处理大数据异常解决方法 整个项目采用微软的ASP.NET MVC3进行开发,前端显示采用EasyUI框架,图表的显示用的是Highcharts,主要进 ...

  2. [转]ASP.NET MVC Json()处理大数据异常解决方法 json maxjsonlength

    本文转自:http://blog.csdn.net/blacksource/article/details/18797055 先对项目做个简单介绍: 整个项目采用微软的ASP.NET MVC3进行开发 ...

  3. ASP.NET MVC Json() 处理大数据异常解决方法 json MaxJsonLength

    网上很多解决方案,在webconfig中添加,但是实践证明无效 <system.web.extensions> <scripting> <webServices> ...

  4. ASP.NET MVC Json()处理大数据异常解决方法,字符串的长度超过了为 maxJsonLength

    问题: 使用 JSON JavaScriptSerializer 进行序列化或反序列化时出错.字符串的长度超过了为 maxJsonLength 属性设置的值. <system.web.exten ...

  5. MySQL数据导入导出方法与工具mysqlimport

    MySQL数据导入导出方法与工具mysqlimport<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office ...

  6. SQLServerException:将截断字符串或二进制数据的解决方法

    SQLServerException:将截断字符串或二进制数据的解决方法: 最近使用JPA进行保存对象到数据库中怎么也添加不进去,始终报错 主要原因就是你增加的数据字段长度超过数据库中字段所定义长度, ...

  7. resultMap中的collection集合出现只能读取一条数据的解决方法

    查询数据时只能获得collection集合中的的一条数据,相关情况如下: 结果集resultMap: <resultMap id="ManagerRolesAcls" typ ...

  8. 【转】Windows2008上传大文件的解决方法(iis7解决上传大容量文件)

    2008上传大文件的解决方法:http://wenku.it168.com/d_000091739.shtml 2003上传大文件的解决方法:http://tech.v01.cn/windowsxit ...

  9. elasticsearch5.0集群大数据量迁移方法及注意事项

    当es集群的数据量较小的情况下elasticdump这个工具比较方便,但是当数据量达到一定级别比如上百G的时候,elasticdump速度就很慢了,此时我们可以使用快照的方法进行备份 elasticd ...

随机推荐

  1. 【html】【16】高级篇--毛玻璃效果[模糊]

    参考: http://www.zhangxinxu.com/wordpress/2013/11/%E5%B0%8Ftip-%E4%BD%BF%E7%94%A8css%E5%B0%86%E5%9B%BE ...

  2. 轮子来袭 vJine.Core Orm 之 03_架构分析

    1.vJine.Core ORM 架构: 如上图所示,vJine.Core ORM的特点如下: 所有操作均以DataManager为核心: DataManager业务部分的增删改查操作依赖于Class ...

  3. JavaScript中的apply与call与arguments对象

    (一) call方法 语法:presentObj.call(thisObj,arg1,arg2,arg3...) 参数thisObj :将被用作当前对象presentObj的对象. 当thisObj无 ...

  4. 选择结构if语句和switch语句的区别

    ------- android培训.java培训.期待与您交流! ---------- 1.选择结构if语句格式及其使用 A:if语句的格式: if(比较表达式1) { 语句体1; }else if( ...

  5. ZOJ 2411 Link Link Look(BFS)

    题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1411 题目大意:连连看,给出每次连线的两个坐标,求能消去多少方块,拐 ...

  6. plsql通过instantclient连接oracle数据库报连接超时

    配置:数据库oracle10.2;服务器操作系统centos5.5:客户机操作系统win7 32位:plsql版本10.0.5 配置前提必须关闭客户机与服务器操作系统的防火墙,否则会出现“连接超时”的 ...

  7. jxl和poi处理excel之比较

    功能需求是根据客户提供的excel模板,程序动态填充其中的一些数据.该模板包含大量的宏,刚拿到的时候头都要晕了,本人虽天天和电脑打交道,但是excel咱不是高手啊,什么宏,之前光听过,听着都觉得是高级 ...

  8. Linux启动级别

    一共有7种启动级别,分别为: #   0 - halt (Do NOT set initdefault to this)  #   1 - Single user mode  #   2 - Mult ...

  9. glDatePicker-2.0 日历插件

    昨天用的日历插件在绑定数据的时候出现了问题,所以今天换了这个glDatePicker-2.0 日历插件 这是我修改后的样式 默认样式是这样的. 我的代码 index.html <!doctype ...

  10. jQuery 1.4.4 中 function( window, undefined ) 写法原因

    读 jQuery 1.4.4 版本代码的时候,发现下面的写法: (function( window, undefined ) { ... // code goes here })(window); w ...