Forum Discussion

herajapakse's avatar
herajapakse
Cloud Apps
08-23-2024
Solved

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

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!

6 Replies

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

  • tuanpham's avatar
    tuanpham
    Sisense Employee

    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. 

  • tuanpham's avatar
    tuanpham
    Sisense Employee

    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. 

  • Hello herajapakse.

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

  • Anonymous's avatar
    Anonymous

    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.