-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Drastic increase in memory usage on develop #3401
Comments
Is the same increase shown in smaller or larger apps? Does it seem to be universally 2* or is it closer to 27MB higher for each app? |
You could look using As for the go memory allocated for sure, for fyne_demo and hello, a big culprit is vendor/github.com/benoitkugler/textlayout/fonts/glyphsnames/glyphs.go which allocate a lot of memory at startup as it use a map which is not read only/doesn't give a chance to the OS to do an optimistic load on it (10% of the allocated memory usage). The second that I do not understand why, but we do allocate and keep allocated a single big *image.Alpha at all time (25% of the allocated memory usage). I would guess it is not necessary to keep it around, but not sure how we can make it better. I think that as we render things in opengl, it would be good to actually have the memory provided by the painter (to avoid unecessary copy and use of things like a single GL buffer) |
With the last two improvements to font memory usage can this be closed @Jacalz? |
I don't know. For some reason I am seeing more memory usage on develop now than on the release branch for v2.3.x. We are still over double to v2.2.4. Will have to check my workstation when I get home and see if I get similar results there. It seems unexpected given that I saw decreases with both of the PRs that you mention. |
That is very strange. |
I am guessing @Jacalz is not using go pprof tools for benchmarking memory consumption, but using linux top or some equivalent tool. This might be also affected by kernel, cpu and general environment. So comparing between machine on those number is hard. |
I was indeed not comparing using pprof but I also wasn't comparing between two machines. Will look into this more |
This is marked as a blocker, does it need to hold back v2.4.0 at this stage? |
Nah. I am still seeing the same amount of memory usage but it shouldn't need to hold back the release. |
Checklist
Describe the bug
I noted during some testing that the memory usage seems to have roughly doubled between v2.2.4 and develop (to be v2.3.0). I initially launched
fyne_demo
and it had a 1.6x increase but switching the view resulted in it becoming a 2x increase:I observed a very similar 2x increase in Rymdport but at initial start without pressing anything.
How to reproduce
fyne_demo
on master branch and on develop branchScreenshots
See screenshots inline above ^
Example code
It does not really matter what code is being used. The demo reproduces the same problem.
Fyne version
4c67d93
Go compiler version
1.18.7
Operating system
Linux
Operating system version
Fedora 36
Additional Information
No response
The text was updated successfully, but these errors were encountered: