Re: out of memory error when creating pptx file
Rob Sargent <[email protected]>
| Newsgroups | gmane.comp.jakarta.poi.user |
|---|---|
| Message-ID | <[email protected]> |
> On Feb 4, 2020, at 1:32 AM, jaehoon jeong <[email protected]> wrote: > > Thank you for your reply. > > I can use about 4g of memory. But I have to handle multiple requests. Memory is remarkably inexpensive compared to your time and your sanity > For example, if three requests come in at the same time, an out of memory error occurs. > > One request takes about 30 seconds. > Are you automatically generating 600slides per online request. Is the slideshow a report? > Saving each of the 100 slides and then merging them also uses a lot of memory. > > Can xerces merge individual pptx files without consuming too much memory? Xerces is an XML tool. Perhaps you can stream edit a template to generate the final show. >> On 2020/02/04 02:30:43, Rob Sargent <[email protected]> wrote: >> >> >>> On 2/3/20 7:20 PM, jaehoon jeong wrote: >>> Thank you for your reply. >>> >>> I am using oracle jdk1.8. But I do not want to increase heap memory. >>> I want to find a solution in another way. >> How little memory must this fit in? >>> >>> What does "chpaters" you mean? >>> For example, does it mean to divide into 100 slides and save each file? >>> >>> I do not want to save as multiple files. >>> I want to save all slides in one file. >>> >>> For example, I'm considering flushing slides to a file every 100 slides created. >>> Is this possible using the poi library? >> How far in to 600 do you get? >> I'm not sure but to save each hundred slides would be to write a new >> workbook. You would then have to merge those into a single workbook via >> poi unless you are prepared to merge the underlying xml files? That >> approach would certainly be more memory efficient but more a xerces >> problem than a poi problem. >>> >>> On 2020/02/03 14:56:13, Rob Sargent <[email protected]> wrote: >>>> Since no one really wants to sit through 600 slides, break the total up in “chapters” and see where that gets you? >>>> >>>> How much memory does you machine have, which version of java are you using. >>>> >>>>> On Feb 3, 2020, at 7:15 AM, jaehoon jeong <[email protected]> wrote: >>>>> >>>>> Hello >>>>> >>>>> I'm trying to generate a pptx file using the poi library. >>>>> The XMLSlideShow class contains about 600 XSLFSlides. >>>>> Each XSLFSlide object uses about 3mb of memory. 1.8gb of memory is required to create one pptx file. >>>>> >>>>> It uses out too much memory, causing an out of memory error. >>>>> And I can't increase the heap memory size. >>>>> >>>>> Is there a way to save slides in multiple times in one pptx file? >>>>> Is there a way to reduce memory usage? >>>>> >>>>> Thanks in advance. >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: [email protected] >>>>> For additional commands, e-mail: [email protected] >>>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [email protected] >>>> For additional commands, e-mail: [email protected] >>>> >>>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >