SlideShare a Scribd company logo
1 of 5
Download to read offline
HFM’s Tricks and Tips

          “Retrieving metadata’s attribute: The impact on the
                       rules’ performance”

                                           Author: Fabio Fiore




HFM’s Tricks and Tips : “Retrieving metadata attribute: The impact on the rules’ performance”   Page 1   of 5
1 Overview

The most part of rules contains “Hs” function to retrieve information about the attribute of
dimension’s members; the retrieve of User Defined attribute frequently used (e.g: Var =
Hs.Account.Ud1(“Account1”) .

The rules’ engine of HFM is based on series of Visual Basic library with specific dll to read/write
in a portion ram memory. In order to performing the write/read actions the rules engine extract data
from a multiple data tables creating a memory sub-cube with following key
(Year/Scenario/Entity/Value/Period).

The attribute of dimension are stored on a different database tables, so when we put a rule to
retrieve a metadata’s attribute HFM has to join on different table while keeping in ram memory the
data necessary to execution of rules you wrote.

This process increase the memory resources utilization and make slowly the execution of rule.




HFM’s Tricks and Tips : “Retrieving metadata attribute: The impact on the rules’ performance”   Page 2   of 5
2 The issue…

In order to better understand the problem and lets assuming we have the two following rules:
 Sub RuleA()                                                Sub RuleB()

 AccList = Hs.Account.List(“Asset”,”[Base]”)                AccList = Hs.Account.List(“Asset”,”[Base]”)
 For Each AccItem in Acclist                                For Each AccItem in Acclist
    If Hs.Account.Ud1(AccItem) = “LongTerm” then                Ud1Var = Hs.Account.Ud1(AccItem)

                 ……Action1 …..                                  If Ud1Var= “LongTerm” then

     ElseIf Hs.Account.Ud1(AccItem) = “ShortTerm” then                        ……Action1 …..

                 ……Action2 …..                                     ElseIf Ud1Var= “ShortTerm” then

Dffd ElseIf Hs.Account.Ud1(AccItem) = “NoFlow” then                           ……Action2 …..

                 ……Action3 …..                                     ElseIf Ud1Var= “NoFlow” then
      End if
                                                                              ……Action3 …..
  Next                                                             End if
                                                            Next
 End Sub
                                                            End sub
                                                            End Sub

Lets assuming that base account of “Asset” are 100 base accounts. In the RuleA HFM will make
300 retrieves from metadata tables, in the RuleB HFM will make 100 retrieves, so:

                        The RuleB will be executed in less time than RuleA

For sure the using of variables is one of best practice to make clear the code written, but sometimes
the beginners consultants don’t use in properly way and stop the use when the rules does not work.
Lets assuming we the following code:
In the RuleA1 the user would like retrieve the Ud1 attribute of current Entity in order to make a

 Sub RuleA1()                                         Sub RuleA2()
 EntUd1 = Hs.Entity.Ud1(Hs.Entity.Member)             EntUd1 = Hs.Entity.Ud1(Hs.Entity.Member)
 AccList = Hs.Account.List(“Asset”,”[Base]”)          C1List = Hs.Custom1t.List(“Flow”,”[Base]”)
 For Each AccItem in Acclist                          For Each AccItem in Acclist
    If EntUd1 = “SAP” then                               If EntUd1 = “SAP” then
          ……Action1 …..                                         ……Action1 …..
   ElseIf EntUd1= “JDE” then                             ElseIf EntUd1= “JDE” then
          ……Action2 …..                                         ……Action2 …..
   ElseIf EntUd1= “BAAN” then                            ElseIf EntUd1= “BAAN” then
          ……Action3 …..                                          ……Action3 …..
   End if                                                 End if
 Next                                                 Next
 Call RuleA2                                          End Sub
 End Sub
series of test on a base members of “Asset” account to do different actions.
In the RuleA2 the user would like retrieve again the Ud1 attribute of current entity in order to make
a series of tests on a base members of “Flow” element in Custom1 dimension.
Since when you join from a visual basic “sub” to another all variables will be set to “null” It seems
you are obliged to retrieve again the Ud1 of entity decreasing the rule performance.
                                                                                                          3 of 5
If you consider that the RuleA1 maybe the standard Calculate Routine and the RuleA2 maybe on of
your customizing routine you can imagine when frequently is this situation.

You can easily improve the rule if use the “pass-through” technique between multiple sub routine.
In the following box you can find an example based on RuleA1 and RuleA2

In this example you find the retrieves of attribute of Entity just one time while the variable
“EntUd1” will be passed in RuleA2.

The “pass-through” technique can very useful in the Calculation Sub routine, you can easily pass
the content of variable in order to improving performance of execution of customize rules.
 Sub RuleA1()                                     Sub RuleA2(EntUd1)
 EntUd1 = Hs.Entity.Ud1(Hs.Entity.Member)         C1List = Hs.Custom1t.List(“Flow”,”[Base]”)
 AccList =Hs.Account.List(“Asset”,”[Base]”)       For Each AccItem in Acclist
 For Each AccItem in Acclist                         If EntUd1 = “SAP” then
    If EntUd1 = “SAP” then                                  ……Action1 …..
         ……Action1 …..                               ElseIf EntUd1= “JDE” then
    ElseIf EntUd1= “JDE” then                              ……Action2 …..
          ……Action2 …..                              ElseIf EntUd1= “BAAN” then
    ElseIf EntUd1= “BAAN” then                             ……Action3 …..
           ……Action3 …..                             End if
      End if                                      Next
 Next                                             End Sub
 Call RuleA2(EntUd1)
 End Sub




                                                                                                 4 of 5
3 On field…

The advantage of reducing the number of retrieves of attribute can improve the performance until
35%. as tested on many customers.


If the execution of process unit (the combination of following dimensions Entity / Value / Scenario
/ Year / Period) without the improving described is 2000 ms (2 seconds) per process unit you will
have the following execution time: (1 scenario and 1 Period)


100 Entity x 6 Value members* x 2 seconds = 1200 s                      20 minutes

With improving suggest you will have:

100 Entity x 6 Value members * x 1,3 seconds = 780 s                    13 minutes

*Entity Currency, Entity Curr Adsj, Parent Currency, Parent Curr Adjs,Parent, Parent Adjs



In order to improve the performance of your rules, decrease the number of retrieving
information from metadata tables.




                                                                                             5 of 5

More Related Content

Similar to HFM's Tricks and Tips: Reducing Metadata Lookups to Improve Rules Performance

The Ring programming language version 1.5.3 book - Part 26 of 184
The Ring programming language version 1.5.3 book - Part 26 of 184The Ring programming language version 1.5.3 book - Part 26 of 184
The Ring programming language version 1.5.3 book - Part 26 of 184Mahmoud Samir Fayed
 
Flying Futures at the same sky can make the sun rise at midnight
Flying Futures at the same sky can make the sun rise at midnightFlying Futures at the same sky can make the sun rise at midnight
Flying Futures at the same sky can make the sun rise at midnightWiem Zine Elabidine
 
Think Async: Asynchronous Patterns in NodeJS
Think Async: Asynchronous Patterns in NodeJSThink Async: Asynchronous Patterns in NodeJS
Think Async: Asynchronous Patterns in NodeJSAdam L Barrett
 
A Small Talk on Getting Big
A Small Talk on Getting BigA Small Talk on Getting Big
A Small Talk on Getting Bigbritt
 
Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013amanabr
 
Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Kurmendra Singh
 
Lesson 4A - Inverses of Functions.ppt
Lesson 4A - Inverses of Functions.pptLesson 4A - Inverses of Functions.ppt
Lesson 4A - Inverses of Functions.pptssuser78a386
 
Apache Flink: API, runtime, and project roadmap
Apache Flink: API, runtime, and project roadmapApache Flink: API, runtime, and project roadmap
Apache Flink: API, runtime, and project roadmapKostas Tzoumas
 
Deep Dive Into Catalyst: Apache Spark 2.0'S Optimizer
Deep Dive Into Catalyst: Apache Spark 2.0'S OptimizerDeep Dive Into Catalyst: Apache Spark 2.0'S Optimizer
Deep Dive Into Catalyst: Apache Spark 2.0'S OptimizerSpark Summit
 
RNN sharing at Trend Micro
RNN sharing at Trend MicroRNN sharing at Trend Micro
RNN sharing at Trend MicroChun Hao Wang
 
Talk - Query monad
Talk - Query monad Talk - Query monad
Talk - Query monad Fabernovel
 
5 must have patterns for your microservice - techorama
5 must have patterns for your microservice - techorama5 must have patterns for your microservice - techorama
5 must have patterns for your microservice - techoramaAli Kheyrollahi
 
Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 DsQundeel
 
Data Structure
Data StructureData Structure
Data Structuresheraz1
 
Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 DsQundeel
 
Código Saudável => Programador Feliz - Rs on Rails 2010
Código Saudável => Programador Feliz - Rs on Rails 2010Código Saudável => Programador Feliz - Rs on Rails 2010
Código Saudável => Programador Feliz - Rs on Rails 2010Plataformatec
 

Similar to HFM's Tricks and Tips: Reducing Metadata Lookups to Improve Rules Performance (20)

The Ring programming language version 1.5.3 book - Part 26 of 184
The Ring programming language version 1.5.3 book - Part 26 of 184The Ring programming language version 1.5.3 book - Part 26 of 184
The Ring programming language version 1.5.3 book - Part 26 of 184
 
Flying Futures at the same sky can make the sun rise at midnight
Flying Futures at the same sky can make the sun rise at midnightFlying Futures at the same sky can make the sun rise at midnight
Flying Futures at the same sky can make the sun rise at midnight
 
Think Async: Asynchronous Patterns in NodeJS
Think Async: Asynchronous Patterns in NodeJSThink Async: Asynchronous Patterns in NodeJS
Think Async: Asynchronous Patterns in NodeJS
 
A Small Talk on Getting Big
A Small Talk on Getting BigA Small Talk on Getting Big
A Small Talk on Getting Big
 
Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013
 
Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013
 
Lesson 4A - Inverses of Functions.ppt
Lesson 4A - Inverses of Functions.pptLesson 4A - Inverses of Functions.ppt
Lesson 4A - Inverses of Functions.ppt
 
Python advance
Python advancePython advance
Python advance
 
Vb.net ii
Vb.net iiVb.net ii
Vb.net ii
 
Apache Flink: API, runtime, and project roadmap
Apache Flink: API, runtime, and project roadmapApache Flink: API, runtime, and project roadmap
Apache Flink: API, runtime, and project roadmap
 
Deep Dive Into Catalyst: Apache Spark 2.0'S Optimizer
Deep Dive Into Catalyst: Apache Spark 2.0'S OptimizerDeep Dive Into Catalyst: Apache Spark 2.0'S Optimizer
Deep Dive Into Catalyst: Apache Spark 2.0'S Optimizer
 
Cc code cards
Cc code cardsCc code cards
Cc code cards
 
An Approach of Improvisation in Efficiency of Apriori Algorithm
An Approach of Improvisation in Efficiency of Apriori AlgorithmAn Approach of Improvisation in Efficiency of Apriori Algorithm
An Approach of Improvisation in Efficiency of Apriori Algorithm
 
RNN sharing at Trend Micro
RNN sharing at Trend MicroRNN sharing at Trend Micro
RNN sharing at Trend Micro
 
Talk - Query monad
Talk - Query monad Talk - Query monad
Talk - Query monad
 
5 must have patterns for your microservice - techorama
5 must have patterns for your microservice - techorama5 must have patterns for your microservice - techorama
5 must have patterns for your microservice - techorama
 
Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 Ds
 
Data Structure
Data StructureData Structure
Data Structure
 
Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 Ds
 
Código Saudável => Programador Feliz - Rs on Rails 2010
Código Saudável => Programador Feliz - Rs on Rails 2010Código Saudável => Programador Feliz - Rs on Rails 2010
Código Saudável => Programador Feliz - Rs on Rails 2010
 

Recently uploaded

(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
The Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdfThe Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdfGale Pooley
 
Vip B Aizawl Call Girls #9907093804 Contact Number Escorts Service Aizawl
Vip B Aizawl Call Girls #9907093804 Contact Number Escorts Service AizawlVip B Aizawl Call Girls #9907093804 Contact Number Escorts Service Aizawl
Vip B Aizawl Call Girls #9907093804 Contact Number Escorts Service Aizawlmakika9823
 
Booking open Available Pune Call Girls Shivane 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Shivane  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Shivane  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Shivane 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdfAdnet Communications
 
Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...
Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...
Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...shivangimorya083
 
The Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdfThe Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdfGale Pooley
 
Q3 2024 Earnings Conference Call and Webcast Slides
Q3 2024 Earnings Conference Call and Webcast SlidesQ3 2024 Earnings Conference Call and Webcast Slides
Q3 2024 Earnings Conference Call and Webcast SlidesMarketing847413
 
VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...
VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...
VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...Suhani Kapoor
 
Instant Issue Debit Cards - School Designs
Instant Issue Debit Cards - School DesignsInstant Issue Debit Cards - School Designs
Instant Issue Debit Cards - School Designsegoetzinger
 
Log your LOA pain with Pension Lab's brilliant campaign
Log your LOA pain with Pension Lab's brilliant campaignLog your LOA pain with Pension Lab's brilliant campaign
Log your LOA pain with Pension Lab's brilliant campaignHenry Tapper
 
Instant Issue Debit Cards - High School Spirit
Instant Issue Debit Cards - High School SpiritInstant Issue Debit Cards - High School Spirit
Instant Issue Debit Cards - High School Spiritegoetzinger
 
letter-from-the-chair-to-the-fca-relating-to-british-steel-pensions-scheme-15...
letter-from-the-chair-to-the-fca-relating-to-british-steel-pensions-scheme-15...letter-from-the-chair-to-the-fca-relating-to-british-steel-pensions-scheme-15...
letter-from-the-chair-to-the-fca-relating-to-british-steel-pensions-scheme-15...Henry Tapper
 
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...Call Girls in Nagpur High Profile
 
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptxFinTech Belgium
 
The Economic History of the U.S. Lecture 17.pdf
The Economic History of the U.S. Lecture 17.pdfThe Economic History of the U.S. Lecture 17.pdf
The Economic History of the U.S. Lecture 17.pdfGale Pooley
 
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...Pooja Nehwal
 
Bladex Earnings Call Presentation 1Q2024
Bladex Earnings Call Presentation 1Q2024Bladex Earnings Call Presentation 1Q2024
Bladex Earnings Call Presentation 1Q2024Bladex
 

Recently uploaded (20)

(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
The Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdfThe Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdf
 
Vip B Aizawl Call Girls #9907093804 Contact Number Escorts Service Aizawl
Vip B Aizawl Call Girls #9907093804 Contact Number Escorts Service AizawlVip B Aizawl Call Girls #9907093804 Contact Number Escorts Service Aizawl
Vip B Aizawl Call Girls #9907093804 Contact Number Escorts Service Aizawl
 
Booking open Available Pune Call Girls Shivane 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Shivane  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Shivane  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Shivane 6297143586 Call Hot Indian Gi...
 
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
 
20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf
 
Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...
Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...
Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...
 
The Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdfThe Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdf
 
Q3 2024 Earnings Conference Call and Webcast Slides
Q3 2024 Earnings Conference Call and Webcast SlidesQ3 2024 Earnings Conference Call and Webcast Slides
Q3 2024 Earnings Conference Call and Webcast Slides
 
VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...
VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...
VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...
 
Instant Issue Debit Cards - School Designs
Instant Issue Debit Cards - School DesignsInstant Issue Debit Cards - School Designs
Instant Issue Debit Cards - School Designs
 
Log your LOA pain with Pension Lab's brilliant campaign
Log your LOA pain with Pension Lab's brilliant campaignLog your LOA pain with Pension Lab's brilliant campaign
Log your LOA pain with Pension Lab's brilliant campaign
 
Instant Issue Debit Cards - High School Spirit
Instant Issue Debit Cards - High School SpiritInstant Issue Debit Cards - High School Spirit
Instant Issue Debit Cards - High School Spirit
 
letter-from-the-chair-to-the-fca-relating-to-british-steel-pensions-scheme-15...
letter-from-the-chair-to-the-fca-relating-to-british-steel-pensions-scheme-15...letter-from-the-chair-to-the-fca-relating-to-british-steel-pensions-scheme-15...
letter-from-the-chair-to-the-fca-relating-to-british-steel-pensions-scheme-15...
 
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
 
Commercial Bank Economic Capsule - April 2024
Commercial Bank Economic Capsule - April 2024Commercial Bank Economic Capsule - April 2024
Commercial Bank Economic Capsule - April 2024
 
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
 
The Economic History of the U.S. Lecture 17.pdf
The Economic History of the U.S. Lecture 17.pdfThe Economic History of the U.S. Lecture 17.pdf
The Economic History of the U.S. Lecture 17.pdf
 
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
 
Bladex Earnings Call Presentation 1Q2024
Bladex Earnings Call Presentation 1Q2024Bladex Earnings Call Presentation 1Q2024
Bladex Earnings Call Presentation 1Q2024
 

HFM's Tricks and Tips: Reducing Metadata Lookups to Improve Rules Performance

  • 1. HFM’s Tricks and Tips “Retrieving metadata’s attribute: The impact on the rules’ performance” Author: Fabio Fiore HFM’s Tricks and Tips : “Retrieving metadata attribute: The impact on the rules’ performance” Page 1 of 5
  • 2. 1 Overview The most part of rules contains “Hs” function to retrieve information about the attribute of dimension’s members; the retrieve of User Defined attribute frequently used (e.g: Var = Hs.Account.Ud1(“Account1”) . The rules’ engine of HFM is based on series of Visual Basic library with specific dll to read/write in a portion ram memory. In order to performing the write/read actions the rules engine extract data from a multiple data tables creating a memory sub-cube with following key (Year/Scenario/Entity/Value/Period). The attribute of dimension are stored on a different database tables, so when we put a rule to retrieve a metadata’s attribute HFM has to join on different table while keeping in ram memory the data necessary to execution of rules you wrote. This process increase the memory resources utilization and make slowly the execution of rule. HFM’s Tricks and Tips : “Retrieving metadata attribute: The impact on the rules’ performance” Page 2 of 5
  • 3. 2 The issue… In order to better understand the problem and lets assuming we have the two following rules: Sub RuleA() Sub RuleB() AccList = Hs.Account.List(“Asset”,”[Base]”) AccList = Hs.Account.List(“Asset”,”[Base]”) For Each AccItem in Acclist For Each AccItem in Acclist If Hs.Account.Ud1(AccItem) = “LongTerm” then Ud1Var = Hs.Account.Ud1(AccItem) ……Action1 ….. If Ud1Var= “LongTerm” then ElseIf Hs.Account.Ud1(AccItem) = “ShortTerm” then ……Action1 ….. ……Action2 ….. ElseIf Ud1Var= “ShortTerm” then Dffd ElseIf Hs.Account.Ud1(AccItem) = “NoFlow” then ……Action2 ….. ……Action3 ….. ElseIf Ud1Var= “NoFlow” then End if ……Action3 ….. Next End if Next End Sub End sub End Sub Lets assuming that base account of “Asset” are 100 base accounts. In the RuleA HFM will make 300 retrieves from metadata tables, in the RuleB HFM will make 100 retrieves, so: The RuleB will be executed in less time than RuleA For sure the using of variables is one of best practice to make clear the code written, but sometimes the beginners consultants don’t use in properly way and stop the use when the rules does not work. Lets assuming we the following code: In the RuleA1 the user would like retrieve the Ud1 attribute of current Entity in order to make a Sub RuleA1() Sub RuleA2() EntUd1 = Hs.Entity.Ud1(Hs.Entity.Member) EntUd1 = Hs.Entity.Ud1(Hs.Entity.Member) AccList = Hs.Account.List(“Asset”,”[Base]”) C1List = Hs.Custom1t.List(“Flow”,”[Base]”) For Each AccItem in Acclist For Each AccItem in Acclist If EntUd1 = “SAP” then If EntUd1 = “SAP” then ……Action1 ….. ……Action1 ….. ElseIf EntUd1= “JDE” then ElseIf EntUd1= “JDE” then ……Action2 ….. ……Action2 ….. ElseIf EntUd1= “BAAN” then ElseIf EntUd1= “BAAN” then ……Action3 ….. ……Action3 ….. End if End if Next Next Call RuleA2 End Sub End Sub series of test on a base members of “Asset” account to do different actions. In the RuleA2 the user would like retrieve again the Ud1 attribute of current entity in order to make a series of tests on a base members of “Flow” element in Custom1 dimension. Since when you join from a visual basic “sub” to another all variables will be set to “null” It seems you are obliged to retrieve again the Ud1 of entity decreasing the rule performance. 3 of 5
  • 4. If you consider that the RuleA1 maybe the standard Calculate Routine and the RuleA2 maybe on of your customizing routine you can imagine when frequently is this situation. You can easily improve the rule if use the “pass-through” technique between multiple sub routine. In the following box you can find an example based on RuleA1 and RuleA2 In this example you find the retrieves of attribute of Entity just one time while the variable “EntUd1” will be passed in RuleA2. The “pass-through” technique can very useful in the Calculation Sub routine, you can easily pass the content of variable in order to improving performance of execution of customize rules. Sub RuleA1() Sub RuleA2(EntUd1) EntUd1 = Hs.Entity.Ud1(Hs.Entity.Member) C1List = Hs.Custom1t.List(“Flow”,”[Base]”) AccList =Hs.Account.List(“Asset”,”[Base]”) For Each AccItem in Acclist For Each AccItem in Acclist If EntUd1 = “SAP” then If EntUd1 = “SAP” then ……Action1 ….. ……Action1 ….. ElseIf EntUd1= “JDE” then ElseIf EntUd1= “JDE” then ……Action2 ….. ……Action2 ….. ElseIf EntUd1= “BAAN” then ElseIf EntUd1= “BAAN” then ……Action3 ….. ……Action3 ….. End if End if Next Next End Sub Call RuleA2(EntUd1) End Sub 4 of 5
  • 5. 3 On field… The advantage of reducing the number of retrieves of attribute can improve the performance until 35%. as tested on many customers. If the execution of process unit (the combination of following dimensions Entity / Value / Scenario / Year / Period) without the improving described is 2000 ms (2 seconds) per process unit you will have the following execution time: (1 scenario and 1 Period) 100 Entity x 6 Value members* x 2 seconds = 1200 s 20 minutes With improving suggest you will have: 100 Entity x 6 Value members * x 1,3 seconds = 780 s 13 minutes *Entity Currency, Entity Curr Adsj, Parent Currency, Parent Curr Adjs,Parent, Parent Adjs In order to improve the performance of your rules, decrease the number of retrieving information from metadata tables. 5 of 5