poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Blake Watson <blake.wat...@pnmac.com>
Subject Re: Too much memory is used when reading a xlsx-file whose size is just 7.3M
Date Fri, 02 Dec 2016 17:43:56 GMT
Well, this is interesting: I've also seen a ballooning of RAM usage (though
I wouldn't call it "violent" =P) when loading a spreadsheet and I didn't
know about the input-stream vs. file distinction. Although, come to think
of it, I'm pulling out of a database so that might not help me.

The excess usage is only temporary, though, right? My small (<100K)
spreadsheets seem to take about 50MB, and my large ones (5MB) seem to take
about 500MB.

On Fri, Dec 2, 2016 at 7:54 AM, Gordon Pettey <petteyg359@gmail.com> wrote:

> On Fri, Dec 2, 2016 at 2:41 AM, Javen O'Neal <javenoneal@gmail.com> wrote:
>
> > CPU pegged due the the Java garbage collector trying to clean up unused
> > memory. The out of memory error is raised when the garbage collector
> cannot
> > free the necessary memory for new objects to be allocated.
> >
> > Have you read the FAQ yet? https://urldefense.proofpoint.
> com/v2/url?u=https-3A__poi.apache.org_faq.html-23faq-2DN10165&d=DgIFaQ&c=
> dmLomitc30UP5j2qU8E1rg&r=p42pHJHEwFZOHtVFHKJUdL2fYbroN3
> 3stXXb3Psthjw&m=K-mZqLKcau3v-2mO1e7Es8pmREXI9_WkDMs3UxiVEsE&s=_
> gk9WyMdApng32mJ3IDsTgjct7dpw_BenPZP-wdE0fA&e=
> >
> > On Dec 2, 2016 00:11, "dokia@126.com" <dokia@126.com> wrote:
> >
> > > Hi!
> > >
> > > I am trying to read a xlsx-file whose size is 7.3M with POI version
> 3.15,
> > > here is the code:
> > >
> > >
> > > *InputStream is = new FileInputStream(new File(path));//line 1Workbook
> > book = new XSSFWorkbook(in);// line 2*
> > > When running to line 2,the memory of javaw rised
> > > violently from 700M to 1200M,cpu from 10% to 90%,the following
> > > is the screenshot of memory dump:
> > >
> >
>
> See https://urldefense.proofpoint.com/v2/url?u=http-3A__poi.
> apache.org_spreadsheet_quick-2Dguide.html-23Files-2Bvs-
> 2BInputStreams&d=DgIFaQ&c=dmLomitc30UP5j2qU8E1rg&r=
> p42pHJHEwFZOHtVFHKJUdL2fYbroN33stXXb3Psthjw&m=K-mZqLKcau3v-
> 2mO1e7Es8pmREXI9_WkDMs3UxiVEsE&s=Q2dr3Xc2iSpx8HHAAj0kQkGXZYpdBK
> 9yZFifR-mQo64&e= ,
> also.
>



-- 

*Blake Watson*

*PNMAC*
Application Development Manager
5898 Condor Drive
Moorpark, CA 93021
(805) 330.4911 x7742
blake.watson@pnmac.com <melanie.petrosyan@pnmac.com>
www.PennyMacUSA.com <http://www.pennymacusa.com/>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message