SmartRule performance limits

JamesAK shared this question 3 years ago
Discussion Open

Does anyone know what the practical limits are to SmartRules?

The problem I have is that when I make a change to any of my active SmartRules, MindManager hangs and is inoperable for 5+ mins. Task Manager shows MindManager as "Not responding" and uses up to 37% of the CPU before, eventually, 'calming-down" and returning control of the window.


My map comprises 394 topics:

  • 1 tree
  • 24 branches (static)
  • 209 sub-branches (static)
  • 161 leaves (dynamic - i.e. can be moved from branch-to-branch).

At the moment, I have 1 rule for each branch, 1 rule for each sub-branch and 18 worker routines, totalling 252 rules. Every rule is set for All Topics as it is the only way for branch and sub-branch rules to be applied to descendant leaves. I would prefer to only apply rules to Specific Topics and Descendants but there doesn't appear to be a way to do that. Please share if you know better.


Each rule contains 2 triggers and 1 effect:

If trigger 1 (topic Belongs to Branch) and trigger 2 (tag A is TRUE), then effect X (mark topic with tag B).

Note: the performance hang only occurs when I make a change to 1 or more SmartRules. When I move, add or delete topic (leaves) to branches or sub-branches, or move, add or delete branches or sub-branches, SmartRules adds tags correctly without issue.


To test whether it was the size of my map or active rule-set (rules marked as Enable), I reduced the map to:

  • 1 tree
  • 1 branch (static)
  • 15 sub-branches (static)
  • 20 leaves (dynamic - i.e. can be moved from branch to branch).

And I also switched off 250 of the 252 rules, leaving on 1 branch rule and 1 sub-branch rule. So, a tiny map with a tiny active set of rules and a large set of non-active rules.

Despite the above changes, when I made a change to either of the still active rules, the same problem occurred again, although the hang only occurs for 3+ mins now. Incidentally the change is always the same: delete an existing trigger and then put it back exactly as it was.

When changes are made to rules in SmartRules it's as if it tries to compile and process every rule for every topic to which it could possibly apply regardless of whether that rule has changed or is marked as NOT Enable(d). Why would that be the case?

I could try optimising the rules-set by combining the branch rules into the sub-rules but without knowing how the rules are being interpreted by the underlying code this seems like a non-productive use of time.

I suspect the problem lies in the way SmartRules have been architected. In the thread below I opened earlier in 2021, it was explained to me that "SmartRules are intended to be dynamic so they are always checking if they are true and only apply effects if they remain true".

https://community.mindmanager.com/topic/573-smart-rules-triggers-effects-how-permanent

There are instances when I may wish for such a thing to be true, and in a conventional programming paradigm, I would write a worker function to do it. In all other instances, I expect changes to be made when I deem they are needed and to remain in effect until I choose them not to be by dint of another rule or worker function.

I don't think it would be too difficult to fix SmartRules. There should be easy wins but it depends if minds are open. I suspect the people who originally championed SmartRules have been side-lined with the bog-standard management line of if users want to do more then they can use the API. That is short-sighted. I've witnessed how MindManager innovation has happened over the decades - a lot of it has been driven by users challenging the team to do more.

I'm going to send this onto Support but if anybody has anything to suggest or add, then please do.

If anyone from the Community or Development teams are reading, I am happy to install any tools on my system that can assist in determining what is going wrong but am not in a position to share the map with you due to confidentiality issues.

Regards


James.

Replies (1)

photo
2

I suggest it will make a big difference to tractability if you are able to give the developers a map that reproduces the issue. I have a tool somewhere that replaces all topic text and notes with Lorem Ipsum, if that would help.

photo
1

That'd be great Nick - will need to check with customer if after running they are satisfied confidentiality is maintained. Have you got a download link or do I need to give you an email address?

photo
3

Email me at nick.duffill@harportconsulting.com and I will send it over. It overwrites all topic text, topic notes, review comments and document properties with Lorem Ipsum, but things like marker names, topic properties and attachments are not overwritten.

---