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. [jquery]高级篇--js绑定事件

    参考:  http://www.cnblogs.com/leejersey/p/3545372.html jQuery on()方法是官方推荐的绑定事件的一个方法.$(selector).on(eve ...

  2. Java实战之02Hibernate-07与效率性能相关配置

    十四.其他HIbernate配置(与效率,性能相关) 1.数据库连接池 Hibernate有默认的连接池,性能有问题,不适合实际应用,适合学习阶段.DriverManagerConnectionPro ...

  3. Oracle配置

    1.安装Oracle11g--->通过Database Configuration Assistant创建新数据库 建数据库注意记住数据库名和SID,安装最后一步解锁scott[密码填tiger ...

  4. call(this)引起的对闭包的重新理解

    call(this)引起的对闭包的重新理解.md 变量的作用域 全局变量局部变量 Javascript语言的特殊之处,就在于函数内部可以直接读取全局变量. 函数外部无法读取函数内的局部变量. 函数内部 ...

  5. php查询ip地址来源归属地的脚本

    <?php header('Content-Type:text/html;charset=utf-8'); if($_GET['sub']){ $ip = $_GET['ip']; $msg = ...

  6. PHP 向 MySql 中数据修改操作时,只对数字操作有效,非数字操作无效,怎么办?

    问题描述:   用PHP向MySql数据库中修改数据,实现增删改(数据库能正确连接) 经测试,代码只能对数字进行正常的增删改操作,非数字操作无效   但要在课程名称中输入中文,应该如果修改呢?   存 ...

  7. 两个不同于LR和jmeter的性能测试工具

    LR图形界面,更利于使用 jmeter采用java,也能够扩展 相对于上两款工具,下面两款性能测试工具都采用了异步IO模型,扩展性都更强速度也更快 gatling:基于scala,速度相比更快性能压力 ...

  8. 2014年度辛星html教程夏季版第六节

    不知道这样大家会不会感觉枯燥,总之不管大家怎么样,辛星始终会陪伴大家的,期待您的关注和支持,也衷心的希望我的博客能让您少走弯路,获得更系统的知识. ***************表格********* ...

  9. 【IT历史】SP和CP

    1.什么是SP?SP是英文Service Provider的缩写,中文翻译为服务提供商,通常是指在移动网内运营增值业务的社会合作单位.它们建立与移动网络建立相连的服务平台,为手机用户提供一系列信息服务 ...

  10. linux下修改IP信息

    在Linux的系统下如何才能修改IP信息 以前总是用ifconfig修改,重启后总是得重做.如果修改配置文件,就不用那么麻烦了- A.修改ip地址 即时生效: # ifconfig eth0 192. ...