zalmoxisus / redux-devtools-extension

Redux DevTools extension.
MIT License
13.48k stars 1.01k forks source link

crashing with Angular@9 and ngrx@8.6 - ngrx@9-RC also #723

Open boskras opened 4 years ago

boskras commented 4 years ago

Hi,

I have a problem with 'Redux DevTools' - at the beginning, it almost freezes the app and after a while, it crashes. When I turn off this extension in browser the App is functioning well. Also on Angular7/8 everything is fine.

my current setup and use case:

browser: Chrome 79.0.3945.130

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.900.4
@angular-devkit/build-angular      0.900.4
@angular-devkit/build-optimizer    0.900.4
@angular-devkit/build-webpack      0.900.4
@angular-devkit/core               9.0.4
@angular-devkit/schematics         9.0.4
@angular/cdk                       9.1.0
@angular/flex-layout               9.0.0-beta.29
@angular/material                  9.1.0
@angular/material-moment-adapter   9.1.0
@ngtools/webpack                   9.0.4
@schematics/angular                9.0.4
@schematics/update                 0.900.4
rxjs                               6.5.4
typescript                         3.7.5
webpack                            4.41.2

I'm monitoring the scroll position and storing it in store. To minimize unnecessary writes to the stack I'm utilizing lodash/throttle

here's a brief sample of code:

import throttle from 'lodash/throttle';

(...)

...in component class...

ngOnInit() {
    document
      .querySelector('mat-sidenav-content')
      .addEventListener(
        'scroll',
        throttle((e) => this.scrollEvent(e), 96, {trailing: true}),
        true
      );
}

scrollEvent = (e): void => {
    let pageConfig: IStackPageConfig = {
      ...some config here...
    };

    (... some transformation code ...)

    this.store.dispatch(new UI.SetPageConfig(pageConfig));
  }

When I switch back to Angular@8 everything is working fine, at v9 for the app to start working i need to comment this line this.store.dispatch(new UI.SetPageConfig(pageConfig));

but then I'm losing one of key functionality

boskras commented 4 years ago

in addition when scrolling high CPU and memory usage Screenshot_1

TheSpaceHuman commented 4 years ago

I confirm on the latest versions: Angular 9.0.6 and ngrx/store-devtools 9.1.2. Dev Tools do not work in Chrome 85 and intermittently work in the Firefox 77

jkop95 commented 3 years ago

I confirm this issue as well, on Angular 9.1.12 and ngrx/store-devtools 9.2.0. Exact same behaviour - Redux DevTools almost freeze the app and then crash after few seconds.

What's wrong?

boskras commented 3 years ago

anything happening with this issue?

boskras commented 3 years ago

Angular 10 also affected with this issue