You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Right now fcitx5-rime uses RimeSync to write data to disk, this has many down sides.
it seems to do more things than just flush the data
it will release all the sessions.
it might be slow and interrupt user
Fcitx5's autosave mechanism will invoke save() for every addon every 30min, and it can be delayed if user is still actively typing text. But in reallife, we still got some report that the auto save is extremely slow (over 5s) and interrupts user's input.
Describe the solution you'd like
I want a fast, maybe async api that
doesn't require session to be released
just user input history to be written and nothing else.
In the mobile case crash/oom kill/slow write maybe more common so having such an option can help a lot on those cases.
The text was updated successfully, but these errors were encountered:
Rimesync not only writes data to the sync directory, but also merges the local userdict.
To temporarily solve this problem, we can execute RImesync after a period of time when the screen is off or the keyboard is hidden.
I understand that the RimeSync is expensive, sounds like an overkill for the job.
I took the safe and convenient option which shuts down the engine in order to free all the dictionaries, making the front-end responsible for blocking all user input activities while the synching job is run.
I imagined a better solution that would make a single database temporarily unavailable for input, while the sync job obtained access to it. That would keep all live Rime session running, and loosing user dictionary support for a short period. The same goes for "autosave user dicrtionary".
It's not a trival change because the dictionary logic isn't prepared for such exceptional case of suddenly unvailable dictionary. Moreover, a Rime dictionary can be only backed by a user dictionary, for example "custom phrase".
If the front end ensures that the autosave task is run in the same thread as processing key input, this could be a simpler change (providing non-thread-safe API).
Is your feature request related to a problem? Please describe.
Right now fcitx5-rime uses RimeSync to write data to disk, this has many down sides.
Fcitx5's autosave mechanism will invoke save() for every addon every 30min, and it can be delayed if user is still actively typing text. But in reallife, we still got some report that the auto save is extremely slow (over 5s) and interrupts user's input.
Describe the solution you'd like
I want a fast, maybe async api that
In the mobile case crash/oom kill/slow write maybe more common so having such an option can help a lot on those cases.
The text was updated successfully, but these errors were encountered: