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

performance improvements for TextInput when dealing with large text. #439

Merged
merged 2 commits into from Apr 2, 2012
Merged

performance improvements for TextInput when dealing with large text. #439

merged 2 commits into from Apr 2, 2012

Conversation

akshayaurora
Copy link
Member

  • Smoother scrolling with large data selection,
  • Allow for faster typing/input.
  • Allow faster bkspc/deletion of text.
  • Allow faster cursor movements.
  • Allow faster selection of text.

To reproduce the issues this fixes::

  1. launch python kivy/uix/textinput.py.
  2. In the multi-line TextInput copy existing data and paste it at the end at-least 10 times to simulate large amount of data.
  3. Typing anything now will be slow even bkspc is comparatively slow.
  4. Selection of text within the line is slow
  5. scrolling with selection is slow

It might just be my system that is slow, but considering kivy targets mobile processors, I think these areas need improvement.

- Smoother scrolling with large data,
- Allow for faster typing/input.
- Allow faster bkspc/deletion of text.
- Allow fatser cursor movements.
- Allow faster selection of text.
self._trigger_refresh_text()
if len(substring) > 1 or substring == '\n':
# Avoid refreshing text on every keystroke.
# Allows for fatser typing of text when the amount of text in
Copy link

Choose a reason for hiding this comment

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

Little typo

@rubik
Copy link

rubik commented Apr 1, 2012

Wow this is great, thank you!

tito added a commit that referenced this pull request Apr 2, 2012
performance improvements for TextInput when dealing with large text.
@tito tito merged commit 4ece702 into kivy:master Apr 2, 2012
@tito
Copy link
Member

tito commented Apr 2, 2012

very good!

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.

None yet

3 participants