diff --git a/double_pinyin.schema.yaml b/double_pinyin.schema.yaml index 9e00433..79d9844 100644 --- a/double_pinyin.schema.yaml +++ b/double_pinyin.schema.yaml @@ -75,6 +75,7 @@ engine: - table_translator@melt_eng # 英文输入(作为子翻译器,优先级需要比原生的低) - reverse_lookup_translator@radical_reverse_lookup - reverse_lookup_translator@wubi98_mint + - lua_translator@*force_gc # 暴力GC,尝试解决小狼毫长期使用的卡顿 filters: - lua_filter@*corrector_filter # 错音错字提示 - lua_filter@*autocap_filter # 英文自动大写 diff --git a/double_pinyin_abc.schema.yaml b/double_pinyin_abc.schema.yaml index e8f5d9e..4adf8f7 100644 --- a/double_pinyin_abc.schema.yaml +++ b/double_pinyin_abc.schema.yaml @@ -75,6 +75,7 @@ engine: - table_translator@melt_eng # 英文输入(作为子翻译器,优先级需要比原生的低) - reverse_lookup_translator@radical_reverse_lookup - reverse_lookup_translator@wubi98_mint + - lua_translator@*force_gc # 暴力GC,尝试解决小狼毫长期使用的卡顿 filters: - lua_filter@*corrector_filter # 错音错字提示 - lua_filter@*autocap_filter # 英文自动大写 diff --git a/double_pinyin_flypy.schema.yaml b/double_pinyin_flypy.schema.yaml index 1f25c92..2ab79a1 100644 --- a/double_pinyin_flypy.schema.yaml +++ b/double_pinyin_flypy.schema.yaml @@ -86,6 +86,7 @@ engine: - reverse_lookup_translator@radical_reverse_lookup - reverse_lookup_translator@wubi98_mint - reverse_lookup_translator@stroke + - lua_translator@*force_gc # 暴力GC,尝试解决小狼毫长期使用的卡顿 filters: - lua_filter@*corrector_filter # 错音错字提示 - lua_filter@*autocap_filter # 英文自动大写 diff --git a/double_pinyin_mspy.schema.yaml b/double_pinyin_mspy.schema.yaml index 0383121..408d578 100644 --- a/double_pinyin_mspy.schema.yaml +++ b/double_pinyin_mspy.schema.yaml @@ -75,6 +75,7 @@ engine: - table_translator@melt_eng # 英文输入(作为子翻译器,优先级需要比原生的低) - reverse_lookup_translator@radical_reverse_lookup - reverse_lookup_translator@wubi98_mint + - lua_translator@*force_gc # 暴力GC,尝试解决小狼毫长期使用的卡顿 filters: - lua_filter@*corrector_filter # 错音错字提示 - lua_filter@*autocap_filter # 英文自动大写 diff --git a/double_pinyin_sogou.schema.yaml b/double_pinyin_sogou.schema.yaml index 7dc3762..90454cd 100644 --- a/double_pinyin_sogou.schema.yaml +++ b/double_pinyin_sogou.schema.yaml @@ -75,6 +75,7 @@ engine: - table_translator@melt_eng # 英文输入(作为子翻译器,优先级需要比原生的低) - reverse_lookup_translator@radical_reverse_lookup - reverse_lookup_translator@wubi98_mint + - lua_translator@*force_gc # 暴力GC,尝试解决小狼毫长期使用的卡顿 filters: - lua_filter@*corrector_filter # 错音错字提示 - lua_filter@*autocap_filter # 英文自动大写 diff --git a/double_pinyin_ziguang.schema.yaml b/double_pinyin_ziguang.schema.yaml index 199f2c2..78a929a 100644 --- a/double_pinyin_ziguang.schema.yaml +++ b/double_pinyin_ziguang.schema.yaml @@ -75,6 +75,7 @@ engine: - table_translator@melt_eng # 英文输入(作为子翻译器,优先级需要比原生的低) - reverse_lookup_translator@radical_reverse_lookup - reverse_lookup_translator@wubi98_mint + - lua_translator@*force_gc # 暴力GC,尝试解决小狼毫长期使用的卡顿 filters: - lua_filter@*corrector_filter # 错音错字提示 - lua_filter@*autocap_filter # 英文自动大写 diff --git a/lua/force_gc.lua b/lua/force_gc.lua new file mode 100644 index 0000000..93fe3a1 --- /dev/null +++ b/lua/force_gc.lua @@ -0,0 +1,9 @@ +-- 暴力 GC +-- 详情 https://github.com/hchunhui/librime-lua/issues/307 +-- 这样也不会导致卡顿,那就每次都调用一下吧,内存稳稳的 +local function force_gc() + -- collectgarbage() + collectgarbage("step") +end + +return force_gc \ No newline at end of file diff --git a/rime_mint.schema.yaml b/rime_mint.schema.yaml index b57e008..ca14d53 100755 --- a/rime_mint.schema.yaml +++ b/rime_mint.schema.yaml @@ -80,6 +80,7 @@ engine: - reverse_lookup_translator@radical_reverse_lookup - reverse_lookup_translator@stroke # - reverse_lookup_translator # 反查模块,多标签情况下去除 + - lua_translator@*force_gc # 暴力GC,尝试解决小狼毫长期使用的卡顿 filters: - lua_filter@*corrector_filter # 错音错字提示 - lua_filter@*autocap_filter # 英文自动大写 diff --git a/rime_mint_flypy.schema.yaml b/rime_mint_flypy.schema.yaml index e0c0429..2553135 100755 --- a/rime_mint_flypy.schema.yaml +++ b/rime_mint_flypy.schema.yaml @@ -80,6 +80,7 @@ engine: - reverse_lookup_translator@radical_reverse_lookup - reverse_lookup_translator@stroke # - reverse_lookup_translator # 反查模块,多标签情况下去除 + - lua_translator@*force_gc # 暴力GC,尝试解决小狼毫长期使用的卡顿 filters: - lua_filter@*corrector_filter # 错音错字提示 - lua_filter@*autocap_filter # 英文自动大写 diff --git a/terra_pinyin.custom.yaml b/terra_pinyin.custom.yaml index c1e6874..5490e1a 100755 --- a/terra_pinyin.custom.yaml +++ b/terra_pinyin.custom.yaml @@ -73,6 +73,7 @@ patch: - reverse_lookup_translator@radical_reverse_lookup - reverse_lookup_translator@stroke - script_translator + - lua_translator@*force_gc # 暴力GC,尝试解决小狼毫长期使用的卡顿 filters: - lua_filter@*autocap_filter # 英文自动大写 - simplifier@emoji_suggestion # Emoji OpenCC diff --git a/wubi86_jidian.schema.yaml b/wubi86_jidian.schema.yaml index c389c60..00df084 100755 --- a/wubi86_jidian.schema.yaml +++ b/wubi86_jidian.schema.yaml @@ -69,6 +69,7 @@ engine: - table_translator@melt_eng # 英文输入(作为子翻译器,优先级需要比原生的低) - reverse_lookup_translator@rime_mint # 反查薄荷拼音 - table_translator + - lua_translator@*force_gc # 暴力GC,尝试解决小狼毫长期使用的卡顿 filters: - lua_filter@*autocap_filter # 英文自动大写 - simplifier@emoji_suggestion # Emoji diff --git a/wubi98_mint.schema.yaml b/wubi98_mint.schema.yaml index 4b0aefc..1f52425 100755 --- a/wubi98_mint.schema.yaml +++ b/wubi98_mint.schema.yaml @@ -72,6 +72,7 @@ engine: - reverse_lookup_translator@rime_mint # 反查薄荷拼音 # - echo_translator # ※ 没有候选词,返回字符 # - reverse_lookup_translator # 反查模块,多标签情况下去除 + - lua_translator@*force_gc # 暴力GC,尝试解决小狼毫长期使用的卡顿 filters: - lua_filter@*autocap_filter # 英文自动大写 - simplifier@emoji_suggestion # Emoji