[GH-ISSUE #477] textView does not respond to key presses #346

Closed
opened 2026-03-04 01:04:12 +03:00 by kerem · 2 comments
Owner

Originally created by @LazarenkoA on GitHub (Jul 19, 2020).
Original GitHub issue: https://github.com/rivo/tview/issues/477

Hi. There is an application based on a table, data is filled into the table. By clicking on the hot key on a line, a textView opens in which the source data is displayed, there can be a lot of data (several thousand lines), if do it like this

txt: = fmt.Sprintf (`[" all "]% v [" "]`, strings.Join (v.sourceLines, "\ n"))
textView.SetText (txt)

there is a freezed when opening, if you display line by line in a separate goroutine then the textView opens immediately, but until all the lines are loaded the textView does not respond to key presses (up, down, other hot keys). In general, working with a textView with large volumes is very slow, can you tell me it is worth using something else instead of a textView, or is there some option that will help me?

Originally created by @LazarenkoA on GitHub (Jul 19, 2020). Original GitHub issue: https://github.com/rivo/tview/issues/477 Hi. There is an application based on a table, data is filled into the table. By clicking on the hot key on a line, a textView opens in which the source data is displayed, there can be a lot of data (several thousand lines), if do it like this ```` txt: = fmt.Sprintf (`[" all "]% v [" "]`, strings.Join (v.sourceLines, "\ n")) textView.SetText (txt) ```` there is a freezed when opening, if you display line by line in a separate goroutine then the textView opens immediately, but until all the lines are loaded the textView does not respond to key presses (up, down, other hot keys). In general, working with a textView with large volumes is very slow, can you tell me it is worth using something else instead of a textView, or is there some option that will help me?
kerem closed this issue 2026-03-04 01:04:13 +03:00
Author
Owner

@rivo commented on GitHub (Sep 15, 2020):

TextView is not made for very large texts. So it will be slow. There are some proposals to speed up text views but I haven't gotten around to looking at them. The code is already pretty complex and rewriting it for speed will take a lot of time.

At the moment, there is no alternative.

<!-- gh-comment-id:692668846 --> @rivo commented on GitHub (Sep 15, 2020): `TextView` is not made for very large texts. So it will be slow. There are some proposals to speed up text views but I haven't gotten around to looking at them. The code is already pretty complex and rewriting it for speed will take a lot of time. At the moment, there is no alternative.
Author
Owner

@rivo commented on GitHub (Nov 17, 2020):

I will close this issue. As mentioned, I don't see a major rewrite on the horizon. But I just upgraded to the latest rivo/uniseg package which may bring a slight improvement to the TextView. (I hope — I haven't run a benchmark yet.)

<!-- gh-comment-id:729136067 --> @rivo commented on GitHub (Nov 17, 2020): I will close this issue. As mentioned, I don't see a major rewrite on the horizon. But I just upgraded to the latest [`rivo/uniseg`](https://github.com/rivo/uniseg) package which may bring a slight improvement to the `TextView`. (I hope — I haven't run a benchmark yet.)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#346
No description provided.