cancel
Showing results for 
Search instead for 
Did you mean: 

Mitigating Optimization Bailouts in Angular with Sisense SDK: Handling CommonJS/AMD Dependencies

herajapakse
8 - Cloud Apps
8 - Cloud Apps

I’m experiencing longer build times after integrating the Sisense Angular SDK into my project. Profiling suggests that CommonJS/AMD dependencies in the SDK are triggering optimization bailouts during the build process.

Has anyone encountered similar issues with the Sisense SDK? I’m looking for strategies to reduce these bailouts or optimize the integration to better fit Angular’s ES module requirements. Any advice on how to improve build performance while using this SDK would be greatly appreciated!

1 ACCEPTED SOLUTION

tuanpham
Sisense Team Member
Sisense Team Member

@herajapakse and @IsaacBlanco yesterday we released CSDK 1.18.0 that contains a fix for this. Please give it a try and let us know if it resolves your issue. 

View solution in original post

6 REPLIES 6

DRay
Community Team Leader
Community Team Leader

Hello @herajapakse.

Thank you for reaching out. I see this doesn't have an answer yet, so I am reaching out internally.

David Raynor (DRay)

nathaniel
Sisense Team Member
Sisense Team Member

@herajapakse could you share more information? does profiling show what specific CommonJS/AMD dependencies are being pulled in? The @sisense/sdk-ui-angular package is already bundled as ESM, so I'm curious if there's a downstream library we're importing as CJS.

herajapakse
8 - Cloud Apps
8 - Cloud Apps

Screenshot 2024-08-28 at 02.54.00.png

I get this warnings along with a increase in build time when I inject the SisenseContextConfig in to the application

tuanpham
Sisense Team Member
Sisense Team Member

Thanks @herajapakse for additional details. We are reviewing a fix to replace `lodash` and `object-hash` with alternatives in ESM format. It will be ready in CSDK v1.18.0 to be released early next week. 

IsaacBlanco
8 - Cloud Apps
8 - Cloud Apps

Thanks for raising this issue @herajapakse , I'm having the same problem currently with my Angular app

tuanpham
Sisense Team Member
Sisense Team Member

@herajapakse and @IsaacBlanco yesterday we released CSDK 1.18.0 that contains a fix for this. Please give it a try and let us know if it resolves your issue.