redux-requests
redux-requests copied to clipboard
rewrite some normalisation functions from recursive function to function with loops
Most things in https://github.com/klis87/redux-saga-requests/tree/master/packages/redux-saga-requests/src/normalizers is implemented as recursive functions.
It is surprisingly fast currently, especially with selectors, but I think it would be nice to refactor it into loops, it would faster for sure and we wouldnt risk stack overflow error
Because recursive functions are easier to understand, I think it is also worth it to leave current implementation as legacy code for reference
Yes, we cannot use normalization for this reason 😢 (performance problem)
Performance problem or maximum stack error? Any case, it would be very useful if you could provide a reproduction of performance issues, you can use https://github.com/klis87/redux-requests/tree/master/examples/showcase as a start, as there you could easily mock some endpoints on the server, as well as it is client side only (no ssr), you could get rid of material ui, can be black and white, just wanna see performance issues
If this is indeed issues with recursiveness, this is a must have to fix
btw, also pls hint me what is problem with performance, initial render, updates?