You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2017/02/10 19:35:33 UTC
[Bug 60723] New: Hyperlink Memory Leak
https://bz.apache.org/bugzilla/show_bug.cgi?id=60723
Bug ID: 60723
Summary: Hyperlink Memory Leak
Product: POI
Version: 3.14-FINAL
Hardware: PC
Status: NEW
Severity: critical
Priority: P2
Component: SXSSF
Assignee: dev@poi.apache.org
Reporter: mattdatascientist@gmail.com
Target Milestone: ---
-When writing a million rows to excel, with each row having a hyper link, it
causes java to run out of memory. Heap space set to 4GB. write to excel without
hyper links ram usage was 160MB, with hyper links it used 4GB and crashed.
-Because a hyperlink object needs to be recreate every time in order for it to
work, it ends up eating ram. There doesn't seem to be a way to close hyperlink
objects after they are used.
-example code:
SXSSFWorkbook wb = new SXSSFWorkbook(100);
SXSSFSheet sheet = wb.createSheet();
CreationHelper createHelper = wb.getCreationHelper();
Hyperlink link;
SXSSFRow row;
SXSSFCell cell;
for(int i=0; i<1000000; i++){
row = sheet.createRow(i);
cell = row.createCell(1);
cell.setCellValue("Click Me");
link = createHelper.createHyperlink(Hyperlink.LINK_URL);
link.setAddress("http://yoururl.com");
cell.setHyperlink(link);
}
//then code to write to file.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 60723] Hyperlink Memory Leak
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60723
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
Status|NEW |RESOLVED
OS| |All
--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
We are already discussing this in bug 60416, I will add your code-example there
to keep the discussion in one place.
*** This bug has been marked as a duplicate of bug 60416 ***
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org