Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Community,
My application contains close to 25 macrois.
Just wanted to know if an application contains so many macros will it affect its performance.
Will macros have an impact on RAM consumption of Application.
Regards
Raj,
Hi,
Yes Macro effects the performance of the application.
The reason is qlikview has no contro over the macros used in the application, so sometimes the macro causes the mulfunction of application.
Qlikview said this in the reference manual.
29.2 Macro functionality limitations
Functionality that will normally work well in macros in the QlikView Server environment
with any type of client is:
• Logical operations such as clearing or selecting in fields
• Operations related to variables
The following types of functionality are not to be used in the QlikView Server environment
, as they may cause unexpected results:
• Layout operations acting on the properties of sheets and sheet objects via
SetProperties
• Operations changing document or user settings
• All operations related to the script, including Reload
• Data reduction operations, e.g. ReduceData
• Operations such as Save and Open document
Regards,
Kaushik Solanki
Hi Kaushik,
Thanks for the speedy reply.. Your answer indeed helps.
Regards
Raj
Hi,
In addition to the above, you may take into consideration the deployment limitations when using macros, since some of then won't work in a server environment (as stated in the Ref. Man. as shown above), and some of them will not work when accessing the document using AJAX clients.
It is always better use the builtin actions rather than macros, whenever possible.
Note as well that the macro code is considered as only one piece of code, so it will stop working when only line has an error (say you have four subs, one of them is called "Acción" with the "ó" that is not supported, all the four subs will stop working).
But generally speaking, it will depends on how you build your macros and what they do (creating a file is likely slower than applying some visualization on a chart, since you are going out of QlikView to the OS and back again). It's a different code than the expressions and scripting, and it's always another source of issues (script, expressions in charts, design).
As far as I'm concerned, I try to avoid macros at any times, even if that means a larger script code, if that is possible.
Hope that makes sense.
BI Consultant
Very good information, and to that I'd like to add one big disadvantage to using macros.
- Macros are executed single threaded
It means that if you have a large data model or a nonoptimized macro that executes slow for one reason or another, the CPU core that executes the macro will run at 100% during the whole execution while the other CPU cores are idle.
Macros are not as optimed as the bult-in actions.
It's also important to note that macros can only run single threaded (not as multi threaded as other QV structures) so, you can note some differences depending on the environment you are using
Regards,
Erich