You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/NationalBankBelgium/stark/blob/master/CONTRIBUTING.md#got-a-question-or-problem
Current behavior
In the showcase application, when we open a page component from the demo-ui module, it is really slow due to lots of action recompute (more than 30 times)
action @ 10:06:47.322 @ngrx/store-devtools/recompute (in 0.20 ms)
main.427cd2a0a19249ced88e.js:1 prev state {StarkLogging: {…}, StarkSession: {…}, StarkSettings: {…}, StarkMessages: {…}, StarkProgressIndicator: {…}, …}
main.427cd2a0a19249ced88e.js:1 action {type: "@ngrx/store-devtools/recompute"}
main.427cd2a0a19249ced88e.js:1 next state {StarkLogging: {…}, StarkSession: {…}, StarkSettings: {…}, StarkMessages: {…}, StarkProgressIndicator: {…}, …}
It's due to the reducer StoreModule.forFeature("MovieSearch", movieSearchReducers) added in the demo-ui module for the Generic Search component.
Expected behavior
The showcase should not be slowed down due to
Minimal reproduction of the problem with instructions
I've had a look on this issue and indeed the store-devtools triggers the @ngrx/store-devtools/recompute action 50 times at most. Why 50? Because we have configured the store-devtools to keep the last 50 dispatched actions in the history tree so we can debug such actions (replay, skip, etc...). So whenever a lazy loaded module is loaded, all the actions in the history are "recomputed".
However the slowdown issue is not related to the X number of times that the @ngrx/store-devtools/recompute action is dispatched. The delay is due to the loading of lazy loaded modules in DEV which is a lot slower than in PROD. By enabling AOT in the development build the delay decreases considerably and it is almost the same as in production.
Unfortunately, we cannot enable AOT in dev at this moment because an error is thrown after the first rebuild when a file is changed:
ERROR in Debug Failure. False expression: Host should not return a redirect source file from `getSourceFile`
Apparently, this issue has been fixed in Angular 8, see angular/angular@3166cff.
Since it's not a blocking issue, we could wait for Stark 11.0.0 with Angular 8
I'm submitting a...
Current behavior
In the showcase application, when we open a page component from the demo-ui module, it is really slow due to lots of action
recompute
(more than 30 times)It's due to the reducer
StoreModule.forFeature("MovieSearch", movieSearchReducers)
added in the demo-ui module for the Generic Search component.Expected behavior
The showcase should not be slowed down due to
Minimal reproduction of the problem with instructions
Go on https://stark.nbb.be/showcase/latest/home, open the console and then go on Stark UI > Components > Action bar then look at the console.
What is the motivation / use case for changing the behavior?
Fix the showcase.
Environment
The text was updated successfully, but these errors were encountered: