Skip to content

Commit

Permalink
test: 使用暴力GC尝试解决小狼毫卡顿问题
Browse files Browse the repository at this point in the history
使用暴力GC方法,尝试解决使用小狼毫一段时间后,可能存在的卡顿问题
  • Loading branch information
YummyCocoa authored and Mintimate committed May 16, 2024
1 parent 2b63fc7 commit d46c91e
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions double_pinyin.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 # 英文自动大写
Expand Down
1 change: 1 addition & 0 deletions double_pinyin_abc.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 # 英文自动大写
Expand Down
1 change: 1 addition & 0 deletions double_pinyin_flypy.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 # 英文自动大写
Expand Down
1 change: 1 addition & 0 deletions double_pinyin_mspy.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 # 英文自动大写
Expand Down
1 change: 1 addition & 0 deletions double_pinyin_sogou.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 # 英文自动大写
Expand Down
1 change: 1 addition & 0 deletions double_pinyin_ziguang.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 # 英文自动大写
Expand Down
9 changes: 9 additions & 0 deletions lua/force_gc.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- 暴力 GC
-- 详情 https://github.com/hchunhui/librime-lua/issues/307
-- 这样也不会导致卡顿,那就每次都调用一下吧,内存稳稳的
local function force_gc()
-- collectgarbage()
collectgarbage("step")
end

return force_gc
1 change: 1 addition & 0 deletions rime_mint.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 # 英文自动大写
Expand Down
1 change: 1 addition & 0 deletions rime_mint_flypy.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 # 英文自动大写
Expand Down
1 change: 1 addition & 0 deletions terra_pinyin.custom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions wubi86_jidian.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions wubi98_mint.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d46c91e

Please sign in to comment.