poi大数据导入解决方法
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大数据导入解决方法的更多相关文章
- .NET MVC Json()处理大数据异常解决方法
[1-部分原文]: .NET MVC Json()处理大数据异常解决方法 整个项目采用微软的ASP.NET MVC3进行开发,前端显示采用EasyUI框架,图表的显示用的是Highcharts,主要进 ...
- [转]ASP.NET MVC Json()处理大数据异常解决方法 json maxjsonlength
本文转自:http://blog.csdn.net/blacksource/article/details/18797055 先对项目做个简单介绍: 整个项目采用微软的ASP.NET MVC3进行开发 ...
- ASP.NET MVC Json() 处理大数据异常解决方法 json MaxJsonLength
网上很多解决方案,在webconfig中添加,但是实践证明无效 <system.web.extensions> <scripting> <webServices> ...
- ASP.NET MVC Json()处理大数据异常解决方法,字符串的长度超过了为 maxJsonLength
问题: 使用 JSON JavaScriptSerializer 进行序列化或反序列化时出错.字符串的长度超过了为 maxJsonLength 属性设置的值. <system.web.exten ...
- MySQL数据导入导出方法与工具mysqlimport
MySQL数据导入导出方法与工具mysqlimport<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office ...
- SQLServerException:将截断字符串或二进制数据的解决方法
SQLServerException:将截断字符串或二进制数据的解决方法: 最近使用JPA进行保存对象到数据库中怎么也添加不进去,始终报错 主要原因就是你增加的数据字段长度超过数据库中字段所定义长度, ...
- resultMap中的collection集合出现只能读取一条数据的解决方法
查询数据时只能获得collection集合中的的一条数据,相关情况如下: 结果集resultMap: <resultMap id="ManagerRolesAcls" typ ...
- 【转】Windows2008上传大文件的解决方法(iis7解决上传大容量文件)
2008上传大文件的解决方法:http://wenku.it168.com/d_000091739.shtml 2003上传大文件的解决方法:http://tech.v01.cn/windowsxit ...
- elasticsearch5.0集群大数据量迁移方法及注意事项
当es集群的数据量较小的情况下elasticdump这个工具比较方便,但是当数据量达到一定级别比如上百G的时候,elasticdump速度就很慢了,此时我们可以使用快照的方法进行备份 elasticd ...
随机推荐
- JavaScript基础-面向对象编程<1>
1.1 函数与对象 1.定义函数的方式定义类 定义类的方法: function class1(){ //类成员的定义及构造函数部分 } class1既是一个函数,也是一个类. 使用 new 操作符获 ...
- [ADO.NET]写入数据
关键字:.NET,SQL SERVER,SQLBULKCOPY 插入一条数据的操作(SqlCmd). public void InsertOneIntoSourceDB() { if (DBConne ...
- struts2自定义拦截器与cookie整合实现用户免重复登入
目的:测试开发时,为了减少用户登入这个繁琐的登入验证,就用struts2做了个简单的struts2拦截器,涉及到了与cookie整合,具体的看代码 结构(两部份)=struts2.xml+自定义拦截器 ...
- Java小程序---接口中抽象方法的实现(解决了JAVA语言不能多继承的问题)
public interface Sing { public static final String eyecolor="black"; public void sleep(); ...
- glDatePicker-2.0 日历插件
昨天用的日历插件在绑定数据的时候出现了问题,所以今天换了这个glDatePicker-2.0 日历插件 这是我修改后的样式 默认样式是这样的. 我的代码 index.html <!doctype ...
- Python3 内建模块 datetime/collections/base64/struct
datetime 我们先看如何获取当前日期和时间: >>> from datetime import datetime >>> now = datetime.now ...
- 转 修改oracle用户密码永不过期
1.查看用户的proifle是哪个,一般是default: sql>SELECT username,PROFILE FROM dba_users; 2.查看指定概要文件(如default)的 ...
- 1. Window环境下 - 开发环境的配置: (安装Android Studio 2.1)
0. Java简介: 1990年Sun公司预料嵌入式系统将在未来家用电器领域大显生手, 于是成立了一个由James Gosling领导的"Green计划"(首席科学家Bill Jo ...
- secureCRT简单上传、下载文件记录
secureCRT简单上传.下载文件记录: 1)sz下载 -y 覆盖 2)rz上传 -y 覆盖 3)以上两个命令属于安装时包含在“Dial-up Networking Support"组中 ...
- IOS中如何判断APP是否安装后首次运行或升级后首次运行
对于是否为首次安装的App可以使用如下方法来判断 [[NSUserDefaults standardUserDefaults] boolForKey:@"firstLaunch"] ...