zefoy/ngx-ace-wrapper

Performance issues

Opened this issue · 1 comments

GupCa commented

The number of js event listeners only increases during switching between component and directive view in the demo. The same issue is observed on prod in my project where ace wrapper is used. This is a marker of memory leak/performance gap for the user who stays longer on the page.

To reproduce:

  1. Go to the ngx-wrapper example app
  2. Open the Performance monitor tab in the Chrome dev tab
  3. Click the Switch to component/directive button multiple times
  4. Observe JS Event listeners graph goes higher each time, and unsubscribing doesn't happen much

It looks like a problem with Ace itself, but I'm creating this to check if fixing it from the wrapper is possible.

image

For me it seems like instance.destroy() is not called.
I tried to do this on my own in ngOnDestroy but this is already too late and there's no instance available anymore.
Please fix this!