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

feat(simplifier): cache opencc #977

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

wzv5
Copy link

@wzv5 wzv5 commented Feb 10, 2025

Pull request

Feature

之前每创建一个 session,就会重复加载一遍 opencc,造成 session 初始化时卡顿,内存占用也会增加 10 MB 左右。如果有几十个 session,就会额外占用几百 MB 内存。
本 pr 为 opencc 增加了缓存机制,避免重复加载。

Unit test

  • Done

Manual test

  • Done

Code Review

  1. Unit and manual test pass
  2. GitHub Action CI pass
  3. At least one contributor reviews and votes
  4. Can be merged clean without conflicts
  5. PR will be merged by rebase upstream base

Additional Info

Copy link
Member

@lotem lotem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

靠譜

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

Successfully merging this pull request may close these issues.

2 participants