Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gvim.exe で ConPty と DirectX の組み合わせ時に :terminal の描画が遅くなる #1377

Open
Milly opened this issue Sep 8, 2021 · 1 comment

Comments

@Milly
Copy link

Milly commented Sep 8, 2021

不具合の内容

Windows の gvim.exe において、 set termwintype=conpty renderoptions=type:directx のオプションを組み合わせた場合に :terminal の描画が遅くなる。

現象・ログ

遅くなる例

set termwintype=conpty renderoptions=type:directx (ConPty + DirectX)

gvim-conpty-directx.mp4

遅くならない例

set termwintype=conpty renderoptions= (ConPty + GDI)

gvim-conpty-gdi.mp4

再現手順

gvim.exe -u NONE -U NONE -c "set nocompatible termwintype=conpty renderoptions=type:directx" -c "terminal ++curwin"
  • gvim.exe のサイズを大きくする (:terminal のウィンドウが広いほど遅くなる)
  • dir を実行
  • color256 を実行
  • color24 を実行
  • cls を実行

color256.bat

@echo off
setlocal EnableDelayedExpansion

set val=
set str=
for /l %%i in (0,1,15) do (
        for /l %%j in (0,1,15) do (
                set /a val=%%i * 16 + %%j
                set val=00!val!
                set val=!val:~-3!
                set str=!str! al!m!val!
        )
        echo !str!
        set str=
)

color24.bat

@echo off
setlocal EnableDelayedExpansion

set str=
for /l %%i in (0,32,255) do (
        for /l %%j in (0,32,255) do (
                for /l %%k in (0,32,255) do (
                        set str=!str!;%%j;%%km
                )
        )
        echo !str!
        set str=
)

期待動作

set termwintype=conpty renderoptions= (ConPty + GDI) と同等の速度で動作して欲しい。

Vimのバージョン

8.2.3361

OSの種類/ディストリ/バージョン

Windows 10 Pro 64bit 20H2 (19042.1165)

使用している or 関係していそうなプラグイン

無し

その他

  • termwintype=conpty renderoptions=type:directx (ConPty + DirectX) → 遅くなる
  • termwintype=conpty renderoptions= (ConPty + GDI) → 遅くならない
  • termwintype= renderoptions=type:directx (winpty + DirectX) → 遅くならない
  • termwintype= renderoptions= (winpty + GDI) → 遅くならない
@mattn
Copy link
Member

mattn commented Sep 16, 2021

ずいぶん差がでますね。うーむ。winpty だと遅くならない点を見ると、ConPty の際に入れてる幾らかの処理 ntak さんがやってた部分に何かしらのボトルネックがあるのかもしれない。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants