JavaScript heap out of memory and bundle size - production build

   Production build issue (ng build --prod)
Hi,

We are about to make a purchase of Syncfusion license and already have the invoicing details, but we are facing an issue which is stopping us from doing so.

We have integrated 

"@syncfusion/ej2-angular-documenteditor": "19.2.62" library in our angular project. 

Locally we are able to build and serve (it has become a lot slower after installing and importing documentEditor).
Our bundle size grew by 3MB! There has to be a solution for this.

Original bundle size: 




After installing documentEditor:


We are currently unable to build our application in our docker environment because there is alwyas a HEAP OUT OF MEMORY exception. I know we can "fix" it by adding --max_old_space_size=xxx flag but that's not a solution in our case. Our docker containers have a fixed size of 2GB ram.

Can you please check this? We have to do a demo before we make the purchase but this is stopping is from 

4 Replies

SM Suriya Murugan Syncfusion Team November 1, 2021 11:06 AM UTC

Hi Jonah, 

Syncfusion Greetings! 

We will check and share details by November 2,2021. 

Regards, 
Suriya M. 



SM Suriya Murugan Syncfusion Team November 2, 2021 09:19 AM UTC

Hi Jonah, 

This is based on our components and its dependencies, example Document editor packages needed some syncfusion packages as dependencies, so it take build size upto 3MB,  

https://ej2.syncfusion.com/angular/documentation/document-editor/getting-started/#dependencies



Compared to button package, it has only few dependencies, so it take only 189kb of size. 

https://ej2.syncfusion.com/angular/documentation/button/getting-started/#dependencies



So, increasing node size is the only solution for javascript memory heap out problem. 

Please let us know if you have any questions. 

Regards, 
Suriya M. 



JO Jonah November 2, 2021 09:50 AM UTC

Hi, 


But our infrastructure doesn't support getting a higher node size than 4096 and it's still not working...

We are using node 15.


There has to be another solution I gues



SM Suriya Murugan Syncfusion Team November 3, 2021 12:08 PM UTC

Hi Jonah, 

Please find below the angular with supported version: 


To resolve the reported issue, increase memory size is the solution. 

Regards, 
Suriya M. 


Loader.
Up arrow icon