我应该在 VS Code 中为“json.maxItemsComputed"设置什么? [英] What should I set for 'json.maxItemsComputed' in VS Code?

查看:313
本文介绍了我应该在 VS Code 中为“json.maxItemsComputed"设置什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认状态为 5000 个符号.这取决于机器的性能还是其他什么?

The default states 5000 symbols. Is this dependent on the machine's performance or something else?

来自 VS Code 设置:

From VS Code settings:

JSON:计算的最大项目数计算的轮廓符号和折叠区域的最大数量(由于性能原因而受到限制).

JSON: Max Items Computed The maximum number of outline symbols and folding regions computed (limited for performance reasons).

推荐答案

这与编辑器中的 GUI 按钮有关,可用于折叠 JSON 树.

This relates to the GUI buttons in the editor, you can use to fold down the JSON tree.

如果项目数超过最大值,准备这些按钮的例程就会放弃,按钮不会显示.我在一个有很多依赖项的项目中使用 package-lock.json 体验过它.

If there are more items than the maximum, the routine that prepares those buttons will just give up, and the buttons won't be displayed. I've experienced it for a package-lock.json in a project with lots of dependencies.

对此的合理方法是:

  • 保持默认
  • 如果您遇到未显示折叠控件的 JSON 文件,考虑你是否真的需要它们
    • 如果您不需要它们 - 没问题
    • 如果您确实需要它们 - 增加限制(可能是暂时的)
    • 如果您在编辑 JSON 文件时遇到性能问题,请降低限制

    这篇关于我应该在 VS Code 中为“json.maxItemsComputed"设置什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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