flet-dev / flet-dev/flet

Application freezes when working with a TextField

Open
#1,771 0 comments 1 reaction 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.