Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Consider custom text input plugin #10

Open
pulyaevskiy opened this issue Jul 16, 2018 · 0 comments
Open

Consider custom text input plugin #10

pulyaevskiy opened this issue Jul 16, 2018 · 0 comments
Labels
question Further information is requested

Comments

@pulyaevskiy
Copy link
Contributor

There are a couple potential issues with the standard TextInputPlugin used in Flutter:

  1. Editing documents involves moving the whole document between native and Dart sides for each and every modification, including selection changes. With large documents this could be rather inefficient.

  2. Since communication with the native side is asynchronous there is a risk of running into race conditions (which already happened once). Current workaround is to prevent document updates from being sent too often to the native side.

How custom text input plugin could address the above issues:

  1. Instead of sending the whole document each time we can send the change Delta only. This should potentially scale to very large documents.
  2. Assign a revision ID to each change Delta sent between Dart and native sides so that when a new change is received it can be handled based on the current state.

This requires a smarter native side implementation which (a) knows how to compose deltas; (b) keeps track of current revision so that updates can be sorted and applied in the correct order. Essentially this would require a local OT server running on the native side.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant