Improving macrodroid performance

md_sgf

Member
Due to at times macrodroid being very slow (eg takes 20s to load macros tab), i am wanting to develop a regular routine which can speed it up to a more reasonable speed.

What presently i'm trying are the following
- restart macrodroid (via App info .. Force stop; cannot, as macrodroid doesn't seem to stop)
- clear macrodroid cache (via App info .. Clear cache)
- restart phone (that seems to be the only way i can restart macrodroid)
- boost ram (via DevInfo app)

I'm also considering buying a 2nd phone, and moving most of my macros (~300) that don't or seldom use to the macrodroid app on that phone, so i can still access/use them (& could easily share any of them back to main phone if need be).
I have a feeling this method may work, as i never had slow speed issues when i first began using macrodroid.

I'm unsure about if an sd card could speed things up. I have no idea. But it does say on packet that it can speed apps up. I'll have to look into that.
 

Endercraft

Moderator (& bug finder :D)
Due to at times macrodroid being very slow (eg takes 20s to load macros tab), i am wanting to develop a regular routine which can speed it up to a more reasonable speed.

What presently i'm trying are the following
- restart macrodroid (via App info .. Force stop; cannot, as macrodroid doesn't seem to stop)
- clear macrodroid cache (via App info .. Clear cache)
- restart phone (that seems to be the only way i can restart macrodroid)
- boost ram (via DevInfo app)

I'm also considering buying a 2nd phone, and moving most of my macros (~300) that don't or seldom use to the macrodroid app on that phone, so i can still access/use them (& could easily share any of them back to main phone if need be)

I'm unsure about if an sd card could speed things up. I have no idea. But it does say on packet that it can speed apps up. I'll have to look into that.
I think it's your device being very slow. Do check the RAM (storage left is important too) to see if it's full.
 

Dm114

Well-known member
Due to at times macrodroid being very slow (eg takes 20s to load macros tab), i am wanting to develop a regular routine which can speed it up to a more reasonable speed.

What presently i'm trying are the following
- restart macrodroid (via App info .. Force stop; cannot, as macrodroid doesn't seem to stop)
- clear macrodroid cache (via App info .. Clear cache)
- restart phone (that seems to be the only way i can restart macrodroid)
- boost ram (via DevInfo app)

I'm also considering buying a 2nd phone, and moving most of my macros (~300) that don't or seldom use to the macrodroid app on that phone, so i can still access/use them (& could easily share any of them back to main phone if need be).
I have a feeling this method may work, as i never had slow speed issues when i first began using macrodroid.

I'm unsure about if an sd card could speed things up. I have no idea. But it does say on packet that it can speed apps up. I'll have to look into that.
Clearing cache may help a little bit but you can do it simply using Send Intent + UI interaction.

You also probably have too many macros. You could do:
- clear all variables (local and/or global ones) for those you don't need to keep their values before leaving a macro;
- disable all macros you don't need at any time. You also can re-enable them programmatically.

It should help!
 

md_sgf

Member
Clearing cache may help a little bit but you can do it simply using Send Intent + UI interaction
I haven't learnt about doing intents yet. I'll download the help & study that.

But i have been clearing cache. Mind you i'm not that keen on causing macrodroid to crash, so might not do that any more.
 

md_sgf

Member
I also have disabled logging for all macros & all variables, clear log, set log level to errors.
I am not using user log in any macros.
 

Endercraft

Moderator (& bug finder :D)
I had to reduce my number of macros from 547 to 202 because the issues I was getting were at a too high level for @MacroDroidDev to reproduce (and I got some weird crashes sometimes).
 

md_sgf

Member
2 screenshots of RAM i took the other day.
 

Attachments

  • macrodroid ram.png
    macrodroid ram.png
    60.8 KB · Views: 25
  • DevInfo ram.png
    DevInfo ram.png
    139.8 KB · Views: 25

Jacob L

Moderator (Lawsonator)
You can disable and enable macros individually and automatically with MacroDroid actions, same with categories. You should consider deleting unused variables which you can find by opening the variables tile.

Shorter variable names and macro names may help but not that much but using the clear variables action will if the variables are storing huge values, I do this at the end of each macro and a bulk delete weekly.
 

MacroDroidDev

Administrator
Staff member
@md_sgf how many macros do you have configured and what device do you have?

MacroDroid was never designed to handle 100s of macros and I never imagined it would be used in this way, so it's fair to say things do not run optimally in this case. I do have plans to refactor things to improve this situation, but the changes will be massive so it will have to wait until my schedule is much clearer than it currently is.
 

md_sgf

Member
I've created 303 macros (86 variables), as shown in System Log.
However I'm only using a handful of them.
I have a few really big macros. Just disabled 3 of them now. I'll see if that helps.

I think i might start removing all the macros i don't use, and put those on my computer, to free up memory. Then i will run macrodroid in an emulator, to access those macros.

My phone is samsung galaxy a12, running android 10, 3.7 GB RAM.

Do you think those 2 screenshots of RAM (above) look ok, RAM-wise?
 

Dm114

Well-known member
I've created 303 macros (86 variables), as shown in System Log.
However I'm only using a handful of them.
I have a few really big macros. Just disabled 3 of them now. I'll see if that helps.

I think i might start removing all the macros i don't use, and put those on my computer, to free up memory. Then i will run macrodroid in an emulator, to access those macros.

My phone is samsung galaxy a12, running android 10, 3.7 GB RAM.

Do you think those 2 screenshots of RAM (above) look ok, RAM-wise?
Those you don't want to remove, just disable them. It'll free a lot of memory and make MD run faster.
 

Dm114

Well-known member
I would actually advocate removal of unused macros (especially massive ones).
You must be right. 😀
I said that because I also have some macros (mainly for test purpose 😉) I sometimes forget to remove and noticed, when looking at the system log, that all the "active" macros are loaded at MD launch time.
 

Endercraft

Moderator (& bug finder :D)
Yes do remove unused macros (especially if there’s A LOT of them) because else if there are too many MacroDroid will not like it.
 

md_sgf

Member
I am also going through all the macro's, and unticking "Allow logging" for each one (if ticked). Most are ticked as that's the default for any new macro (which is on my wishlist - to allow user to choose whether new macros are set by default to allow logging ... personally i almost never use it, but use dialogs, popup messages, & logging, for debugging my macros).
I'm not sure if this will also improve performance, but i thought i might do just in case it does improve speed a bit.

Also, concerning logging, this wouldn't be a bug?
I clear logging for a macro in Home .. System Log, but it STAYS as "Allow logging" ticked.
 
Top