Application freezes when working with a TextField
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17k
- Forks
- 694
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 33
Description
import flet as ft
def main(page: ft.Page):
value = "\n".join(str(i % 10) for i in range(300000))
page.add(
ft.TextField(
multiline=True,
min_lines=3,
max_lines=12,
value=value,
),
)
ft.run(main)
Situation - Text insertion
When I insert 300_000 characters, the application freezes
Text insertion is expected to take less than 1 second
- windows 10
- python 3.11.2
- flet 0.10.1
Situation - Text selection
First I insert 300_000 characters, this happens in a second, and then I try to highlight the entire text. The application freezes
Text selection is expected to take less than 1 second
- fedora 36
- python 3.10.11
- flet 0.9.0
Attached is the text for the test
test.txt
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided Python TextField reproduction using a 300,000-character value, and compare text insertion with full-text selection. Confirm that both operations complete in under one second on the affected platforms; the payload does not name a source file or test to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- frontend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100