Does Having 1,000 Global Variables Slow Down the KM Editor or KM Performance?

Wow, you just gave me a great idea. I could create a macro that examines the contents of all variables (using the For Each action using the option of "Variables") and store the results of all variables in a dictionary where the key is the variable's name. It would also store the time of the inspection in a second dictionary. The next time the macro runs (perhaps on an hourly periodic timer?) it would compare the current value to the last recorded value. If the values differ, it would update the time in the second dictionary, but if the value were the same, it would not update the second dictionary. Using this polling technique, we could create a second macro that could use these two dictionaries to sort and display the variables by "most recently used."

It would also be possible using a third dictionary to keep a tally of the number of times a variables changes. This could provide a means of generating a "most frequently used" list.

I doubt that this would take more than an hour to program. If someone wants the glory, go ahead and code it, I won't mind. I need to go make dinner.

EDIT: Okay, I've finished it. Technically, it took me 90 minutes but 66% of that time was getting frustrated by two problems I had, that might be bugs in KM actions. I'll post my solution shortly in the Macros forum of this website.

My solution for tracking when variables were changed, and how often they were changed, is uploaded here:

1 Like