Hi,

XSLF and XmlBeans are undoubtedly memory hogs, but I can't solve this in a 
short period -
I often thought about an internal model which we could use for XSLF / HSLF but 
lets get back to your issue.

So when you say, you need to generate 600 slides ... does that mean they have 
similar structure?
i.e. could you use a template mechanism?

If true, I would generate one set of slides and then copy and fill those with 
the repetitive data outside of POI.
So handling the two XML files (slide + .refs) and adding it to the zip file is 
no magic.
Apart of the slides the presentation.xml and its .refs need also to be modified.

Andi



On 03.02.20 15:15, jaehoon jeong 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]
>


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to