wendou-chen/dsh-render-perf ↗★ 0

@dsh-external/dsh-render-perf

DSH Web 公式渲染性能治理:运行时注入公式渲染结果缓存(不修改安装目录)+ 视口外渲染跳过 用于提升公式渲染性能。适合公式密集型任务,免重启热加载且零侵入。

패키지
@dsh-external/dsh-render-perf
호환성
미검증
버전
0.1.0
라이선스
MIT
최근 업데이트
2026. 9. 16.

설치

검증된 bundle이 없거나 호환성 검사에 실패했습니다. 먼저 저장소 설명을 읽어 주세요. 전체 README 읽기 ↗

📦 安装与使用指南

方式一:使用 DSH 超级注入器(推荐 · 免重启热加载)

若您的 DSH 已经装载了 dsh-super-injector,可直接在终端或 Agent 中一键免重启热注入:


### 方式一:使用 DSH 超级注入器(推荐 · 免重启热加载)

若您的 DSH 已经装载了 `dsh-super-injector`,可直接在终端或 Agent 中一键免重启热注入:

```powershell

### 方式二:手动配置 Profile 装配(冷启动方式)

1. 在 `~/.dsh/profiles/web/package.json`(或 `desktop` Profile)的 `dependencies` 中添加软链接:

   ```json
   {
     "dependencies": {
       "@dsh-external/dsh-render-perf": "link:D:/dsh-render-perf"
     },
     "dsh": {
       "bundles": [
         "@dsh-external/dsh-render-perf"
       ]
     }
   }
  1. 在对应 Profile 的 node_modules/ 下建立软链接(Windows Junction):

    cmd /c mklink /J "C:\Users\\.dsh\profiles\web\node_modules\@dsh-external\dsh-render-perf" "D:\dsh-render-perf"
    
  2. 启动或重启 DSH 服务即可生效。

⚙️ 配置项说明

字段类型默认说明
enabledbooleantrue总开关,关闭时插件不注册任何路由与样式
distDirstring''手动指定 dsh-web-frontend/dist 目录;留空自动探测(进程入口推导 / 模块解析 / 常见全局路径)
mode'element' | 'html'element补丁形态,见下

关于 html 模式(实测负优化,默认不启用)

html 模式把每个公式的子树交给 dangerouslySetInnerHTML,理论上省掉上百个 React 元素对象。实测反而更慢:

模式热切回主线程长任务
element(默认)455 ~ 601 ms
html699 ~ 774 ms

原因:数百次独立 innerHTML 赋值各自的解析与样式失效开销,超过了 React 批量建 DOM 的成本。该模式保留在代码中供不同 DSH 版本对比验证,默认不启用。