Skip to content

正規表現エンジン NFA を使用している場合に context_filetype#get() が遅い #13

@osyo-manga

Description

@osyo-manga

正規表現エンジン NFA を使用している場合に context_filetype#get() が遅くなるケースがあったので報告しておきます。
同じバッファで処理時間を測ってみた場合、以下のようになりました。

行位置 NFAの有無 処理時間(ms)
1000 なし 0.0019
1000 あり 0.0151
2500 なし 0.0034
2500 あり 0.0828

g:context_filetype#search_offset はデフォルト値

現状では g:context_filetype#search_offset の値を小さくしたり、NFA を使用しないようにすることで回避することが可能です。
この問題は context_filetype.vim を使用しているプラグイン(neocomplete.vim 等)に影響してくると思います。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions