-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Apparently, this is not a bug. It is still important to point it out, though.
And I can’t delete the issue, anyway.
After searching, I could not find anything related to this.
Describe the bug:
Entry seems to have some problems with memory. Adding any character drastically increased memory usage.
The memory usage increases extremely quickly when characters are added to a widget Entry. I added the string "Hello" in
a text entry. The memory usage jumped from a stable 14.2 MB to a stable 18 MB. I left it for a while and the memory was still high.
I also gave it 100 characters. The memory went from 14.2 MB to a stable 22.5 MB.
And giving it 245, it managed to reach 110 MB of memory usage. But this was a multiline entry.
To Reproduce:
Steps to reproduce the behaviour:
Use this code: https://paste.gg/p/anonymous/b92b73bf8870438895df687f2a7984d1
which creates a widget.NewEntry in a container.New with a layout.NewGridLayout.
Run go mod init
Run go mod tidy
Compile with go build -ldflags -H=windowsgui or equivalent.
Screenshots:
The last image has a roughly 245 characters. Though, it is of a MultiLineEntry
(Note: I restarted the app for every picture). Sorry if the images aren't clear, I don't know why that suddenly happened. They should be readable, though.
Example code:
app := app.New()
win := app.NewWindow("")
content := container.New(
widget.NewEntry(),
)
win.SetContent(content)
win.ShowAndRun()Device (please complete the following information):
- OS: Windows
- Version: 10
- Go version: 1.18.1
- Fyne version: v2.1.4



