Chrome浏览器标签中是否有内部内存限制? [英] Is there any internal memory limit in Chrome browser tab?

查看:1385
本文介绍了Chrome浏览器标签中是否有内部内存限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google Chrome浏览器中是否有内部内存限制用于使用javaScript加载JSON数据?



我已经完成的步骤如下所示!!



1)从以下链接复制Index .html和flare.json文件 - http://bl.ocks.org/mbostock/4063269



2)在flare.json文件中添加更多数据。



3)运行index.html文件

加载超过5 MB的JSON文件浏览器因脚本错误而崩溃



任何人都可以告诉为什么Chrome浏览器显示无响应的脚本错误?

当单个选项卡的chrome使用超过248 mb时,脚本错误无响应,

如果我们继续使用相同的选项卡将使用1.5 GB内存!!

Is there any Internal memory limit in Google chrome browser for loading JSON data using javaScript ??

The steps that I have done is given below !!

1)Copy the Index .html and flare.json file from the following link- http://bl.ocks.org/mbostock/4063269

2)Add more data to the flare.json file.

3)run the index.html file
while loading more than 5 mb JSON file the browser crashed with the script error

Can any one tell why the chrome browser showing unresponsive script error ?
When a single tab of chrome using more than 248 mb,getting unresponsive script error,
If we give continue the same tab will use 1.5 gb memory !!

推荐答案

请参阅 - 响应浏览器的最大json大小 [< a href =http://stackoverflow.com/a/8937751/1099247target =_ blanktitle =New Window> ^ ]。

Refer - Maximum json size for response to the browser[^].
引用:



HTTP响应没有大小限制。 JSON将作为HTTP响应发布。因此它也没有大小限制。


An HTTP response has no size limit. JSON is coming as an HTTP response. So it has no size limit either.

如果从JSON响应解析的对象消耗太多内存,则可能存在问题。它会崩溃浏览器。因此,最好使用不同的数据大小进行测试,并检查您的应用是否正常工作。

There might be problem if the object parsed from JSON response consumes too much memory. It'll crash the browser. So it's better you test with different data sizes and check whether your app works correctly.

我认为延迟加载是最好的方法。大量数据。特别是在处理对象文字时。

I think lazy-loading is the best approach for such large amounts of data. Especially when dealing with object literals.

参见高性能Ajax应用程序


这篇关于Chrome浏览器标签中是否有内部内存限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆