redux - NGXS state size and performance
问题描述
I'm impressed with the redux-like pattern in Angular, and I'm hooked into NGXS (I compared this with NGRX and Akita, but opted for NGXS).
I'm aware that NGXS stores all the previous states within the application, so if I've a very complex UI, with tons of grid manipulations, etc which on each action adds a new state, won't the global state object becomes 'very large' and bulky with the entire hierarchy of the previous states ?
Is there a performance issue with this as the application gets complex and complex ?
解决方案
NGXS 不存储应用程序以前的状态。当您添加开发工具插件并打开 Redux 开发工具时,每个状态更改都会发送到 Redux 开发工具。它将是存储先前应用程序状态的开发工具。
随着应用程序状态树变得越来越大,您会看到的唯一性能损失是在您打开 Redux 开发工具时。除此之外,它完全取决于您如何设计状态和选择器。
推荐阅读
- toloka - 为 Toloka.ai 任务提供资产的存储
- c# - 如何在 .NET Core 3.1 中对签名进行 DER 编码?
- django-rest-framework - Django rest 按字段过滤数据
- python-3.x - Dom Traversal 与 lxml 进入图数据库并传递 ID 以建立完整的树
- javascript - 解释 chrome 扩展的 background.js 中的十六进制变量
- laravel - Lavachart - 无法设置 null 的“样式”属性
- powershell - Windows 11 是否破坏了 Visual Studio Code
- python - 在行中追加新元素并保存 CSV [python]
- docker - Docker 容器中不存在文件
- next.js - 如何在 ubuntu-nginx-server 中部署 nextjs?