简体   繁体   English

redux商店的最大内存大小是多少?

[英]What's the maximum memory size of the redux store?

I am writing an App in React. 我正在React写一个应用程序。 I am using Redux to store my data on page. 我正在使用Redux将我的数据存储在页面上。 This Data contains a huge user object ( nested max. 3 levels ) which contains all user data. 此数据包含一个巨大的用户对象(嵌套最多3级),其中包含所有用户数据。 I am using it almast anywhere so I think that it is good to store it in redux and not to request it from server everytime when I need it. 我在任何地方使用它都是almast所以我认为将它存储在redux中是好的,而不是每次需要时都从服务器请求它。 This Data can be about 70-80 KB but I think average size of each user will be 30-40 kb. 这个数据大约是70-80 KB,但我认为每个用户的平均大小为30-40 kb。

This data is modified with combined of 5-6 reducers and 30-50 actions. 该数据通过5-6个减速器和30-50个动作的组合进行修改。 I have one component which uses all of this data and 10-15 components which uses some part of it. 我有一个使用所有这些数据的组件和10-15个使用它的一部分的组件。

can redux store be almost 100 kb in size? redux存储的大小几乎是100 kb?

does it affect the App performance? 它会影响App性能吗?

can any browser handle my app without any performance issues? 任何浏览器可以处理我的应用程序没有任何性能问

Can you provide your average redux store size? 你能提供你的平均redux商店大小吗?

What is the average number of actions and reducers one can have? 一个人可以拥有的行动和减少者的平均数量是多少?

Open "More Tools" -> "Task Manager" in Chrome. 在Chrome中打开“更多工具” - >“任务管理器”。

Open the twitter web app and find the tab in Task Manager. 打开twitter Web应用程序,在任务管理器中找到该选项卡。 Mine started at 120MB. 我的起始速度为120MB。

Start scrolling and see how long it takes to crack 500MB. 开始滚动,看看破解500MB需要多长时间。

I know it's not directly related to data stored in Redux considering most of it is gifs, etc, but it is related I think it demonstrates that talking about limits of 100KB is not worth the thought involved. 我知道它与存储在Redux中的数据没有直接关系,考虑到大多数是gifs等,但它是相关的我认为它表明谈论100KB的限制是不值得的。 I'd be very surprised if you could find a device with a browser that had any issues with even 10MB. 如果你能找到一个浏览器甚至10MB都有问题的设备,我会感到非常惊讶。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM