-
Notifications
You must be signed in to change notification settings - Fork 1.3k
0.2-0.3 MiB allocated per keystroke on awesomescreen #21293
Comments
I ran the AS allocation tracker with the following steps:
The major improvements I see are:
Here's the full summary of what I found in the allocation tracker:
Threads:
|
I attempted an implementation of my suggested fix in this branch but writing the tests took a while (and they feel necessary for such critical code) so I stopped working on it. |
I used the app and monitored the memory allocations: I never noticed the GC causing disruptions in the UI and in general, the JVM allocations are tiny compared to the allocations from the native code so perhaps JVM memory isn't a major issue, at least compared to runtime delays users perceive (e.g. clicking a button and a long pause before it happens). |
I filed mozilla-mobile/android-components#11015 to make this bite-sized.
This code is changing so we'll have to remeasure later. We're actively looking at the search screen so we don't need to file a new issue.
An issue & a PR is opened for this one.
Let's revisit this one next triage. We can file a new issue if folks think its an issue. After that, we can close this issue. |
I want to clean up this issue so it's easier to triage so I'll go through the breakdown again.
Let's file this when we're more confident memory is an issue.
This is changing so we'll refile if we see issues later.
Improved in mozilla-mobile/android-components#11015 and open follow-up in mozilla-mobile/android-components#11100
Partially addressed in #21294 So I think we can close this. |
Discovered in #21171 (comment)
Steps to reproduce
Expected behavior
Small increase in memory
Actual behavior
0.2 - 0.3 MiB allocated. That's 1 MiB per 5 characters. This seems excessive but I don't have the intuition to know for sure.
We should investigate what is being allocated and if it can be removed because these allocations use memory that may slow down later parts of the app, they cause GCs, and they may use more power (especially via GCs). A non-trivial amount of these allocations may come from #21294
Device information
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: