5 Replies Latest reply: Nov 5, 2009 12:09 AM by John Witherspoon RSS

    Advantage of triggers over macros?

    Sally Hurley
      Greetings.
      I'm looking to continue working on one of my documents (originally built in 8.5) using version 9.0. I would like more information on triggers. Is it worth converting some of my functionality that's in macros to actions in the triggers (clear all, activate sheet, set variables)? Do triggers work faster than macros? Or are they just a different way to execute the same functionality (the whole single-threaded business)?

      Thanks.


        • Advantage of triggers over macros?
          Peter Rieper

          Never touch a running system!

          would be my answer. If you have something up & running, why to change?

          Peter

            • Advantage of triggers over macros?
              Sally Hurley

              Because its not exactly running -- still very much under development. Macroed six ways to Sunday. If there's *any* speed advantage, I need it. Because if its easier to maintain or develop in the future, I'll take it.

                • Advantage of triggers over macros?
                  John Witherspoon

                  With absolutely no evidence, QlikView 9 testing, or reference manual reading to support this, I'm going to guess that you MIGHT see certain kinds of performance improvements by using actions.

                  When you fire a macro, QlikView clears all of its caches and such because a macro can do ANYTHING, and QlikView has lost control. So after every macro, it has to retrench and start over.

                  When you fire an action, I'm GUESSING that QlikView won't be so quick to trash all of its carefully cached data, because it KNOWS what each action is and what it is capable of. So it would seem to me that if QlikTech has carefully designed how it handles the combination of cached data and triggered actions, you could see some performance improvements. And if they haven't done that yet, I would expect it in a future release.

                  That is very much a guess, though.

                    • Advantage of triggers over macros?

                       


                      John Witherspoon wrote:
                      With absolutely no evidence, QlikView 9 testing, or reference manual reading to support this, I'm going to guess that you MIGHT see certain kinds of performance improvements by using actions.
                      When you fire a macro, QlikView clears all of its caches and such because a macro can do ANYTHING, and QlikView has lost control. So after every macro, it has to retrench and start over.
                      When you fire an action, I'm GUESSING that QlikView won't be so quick to trash all of its carefully cached data, because it KNOWS what each action is and what it is capable of. So it would seem to me that if QlikTech has carefully designed how it handles the combination of cached data and triggered actions, you could see some performance improvements. And if they haven't done that yet, I would expect it in a future release.
                      That is very much a guess, though. <div></div>


                      Big Smile

                      Some very good observations! Yes you should see a performance increase from using actions (macro killers!) over macros. The cache will not be clear, they are multi-threaded. This and simplicity where exactly the reasons we developed actions.