On Fri, Dec 2, 2016 at 2:41 AM, Javen O'Neal <[email protected]> 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://poi.apache.org/faq.html#faq-N10165
>
> On Dec 2, 2016 00:11, "[email protected]" <[email protected]> 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 http://poi.apache.org/spreadsheet/quick-guide.html#Files+vs+InputStreams,
also.

Reply via email to