Skip to content
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

Assistance needed: Active Pedometer widget takes too much memory #296

Closed
Purple-Tentacle opened this issue Apr 14, 2020 · 3 comments
Closed

Comments

@Purple-Tentacle
Copy link
Contributor

I need someone to assist me saving memory in my widget.
My dev version can be found here: https://github.com/Purple-Tentacle/BangleAppsDev/tree/master/apps/pedometer

I know that I am using long variable names and a lot of comments, but I am hoping for a minifier to get implemented into the app loader soon.

Where can memory be saved otherwise?

@Purple-Tentacle Purple-Tentacle changed the title Active Pedometer widget takes too much memory Assistance needed: Active Pedometer widget takes too much memory Apr 14, 2020
@gfwilliams
Copy link
Member

This sort of thing might be better discussed in the forum so this repo doesn't get clogged up with generic questions, but I took a quick peek, and:

  • moving DEFAULTS into the function where it's used would help you a little.
  • deleting pedomData after use would help
  • try not to keep the settings object around as that could end up being quite large

... that might shave a bit of space off

@lixas
Copy link
Contributor

lixas commented Apr 14, 2020

variable stepsDisplayLarge is used only once, so maybe there is no point to declare that. I would use it directly in g.drawString function @ 133 line. Also, that would fix bug when step is taken right after midnight- stepsCounted =1 but in higher font- yesterdays data :)

@gfwilliams
Copy link
Member

Closing this now. Also this kind of thing is probably better done on the forum...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants