You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何提升华硕Vivobook S15上VS Code及Live Preview的运行速度?

VS Code启动及Live Preview提速方案

系统层面优化

  • 排除VS Code目录的Windows Defender扫描:
    打开Windows安全中心→病毒和威胁防护→管理设置→添加或删除排除项,将VS Code安装目录(默认C:\Users\<你的用户名>\AppData\Local\Programs\Microsoft VS Code)和用户数据目录(C:\Users\<你的用户名>\.vscode)加入排除列表。
  • 关闭Windows 11快速启动:
    进入控制面板→硬件和声音→电源选项→选择电源按钮的功能→更改当前不可用的设置,取消勾选「启用快速启动」后重启系统。
  • 提升VS Code进程优先级:
    启动VS Code后打开任务管理器(Ctrl+Shift+Esc),找到Code.exe进程,右键选择「设置优先级」→「高」。

VS Code自身配置调整

  • 添加性能优化配置到settings.json:
    按Ctrl+Shift+P打开命令面板,输入Preferences: Open Settings (JSON),插入以下配置:
    "files.exclude": {
      "**/.git": true,
      "**/.svn": true,
      "**/node_modules": true // 非前端项目可添加,前端项目建议跳过
    },
    "search.exclude": {
      "**/node_modules": true,
      "**/bower_components": true
    },
    "window.reopenFolders": "none",
    "workbench.startupEditor": "none",
    "editor.largeFileOptimizations": true,
    "files.watcherExclude": {
      "**/node_modules/**": true,
      "**/.git/**": true
    }
    
  • 重置用户数据目录:
    关闭VS Code,将C:\Users\<你的用户名>\.vscode重命名为.vscode-backup,重启VS Code生成新目录测试速度,若有效再逐步恢复扩展和配置。
  • 禁用硬件加速:
    打开命令面板输入Preferences: Configure Runtime Arguments,在argv.json中添加"disable-hardware-acceleration": true,保存后重启VS Code(核显可能存在硬件加速兼容性问题)。

Live Preview专项优化

  • 设置手动刷新:
    打开VS Code设置(Ctrl+,),搜索Live Preview: Auto Refresh,选择manual模式,避免文件变动时频繁刷新占用资源。
  • 限定预览目录:
    在settings.json中添加"livePreview.serverRoot": "${workspaceFolder}/src"(根据项目结构调整路径),缩小预览扫描范围。

内容的提问来源于stack exchange,提问作者Geetansh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.13 21:06:02