What have you found to be the biggest roi in terms of model optimization?

Options
Olek P
edited March 21 in Modeling

I have a very slow model that I want to start optimizing. There's obviously a lot to do. Anyone have any great success stories? What did you do? Where should I start?

Best Answers

  • 1636583
    edited March 21 Answer ✓
    Options

    Hello @Olek P

    I would suggest you to start with modules with high cell count, by checking "applies to" area. This would impact majorly on size portion.

    Also check,
    >if any segregation line items have any format if yes change it to No Data.

    >If you can optimize the formula instead of multiple line items.

    >Check each line item "applies to" is it requires entire module dimension or not.

    After modules you can focus on dimensionality like is it required to use entire list or subsets. Refer the best practices, PLANS etc in community for optimization.

    Note: If model is slow means it is linked with model performance as well not only size, so try to split modules with lots of subsidiary view line items and high cell count. If you can reach out Anaplan support, they will provide you the detailed report on processing times for each module so with the help of that you can focus on optimization.

    Few insights, hope these will help you :)

  • TristanS
    Answer ✓
    Options

    @Olek P slowness I've experienced with two different clients/projects have related to data related updates. I Scenario 1: User would insert a new list item and it would take at least 20 seconds before Anaplan finished inserting the list

    Scenario 2: User would update data for a date or numeric line item and take several seconds (at least 5 seconds) before the user could do anything on Anaplan

    Before I provide details of what we did to optimise performance, I suggest you check with Anaplan if you can request for a Model Open Analysis (MOA) report. Depending on your license agreement, I think you can request two MOA reports for free every year. Example report below, the module and line items I've abstracted but the calculation times and % are from a real MOA report

    Module

    LineItem

    Total calculation time (ms)

    % of total calculation time

    xxx1

    generic1

    2007418

    76.76

    zzz3

    generic2

    168958

    6.46

    yyy4

    generic3

    44914

    1.72

    So for the first scenario above, it was inserting a list for a campaign promotion. Those things you get a sale advertised at 50% off on tv/catalogue. What we found was there was actually a marked time difference in list insertion time if you insert via the UX "Create Forms" action vs if you just run an Anaplan model import action to insert the list item.

    Fix 1: So the fix for that was to not use the UX "Create Forms" action. We added a new module that requested for the details you usually prompt in the Create Forms UX and had the user enter the details there. The user then had to click on a "Create" button which was an action that imported the data from the new module in to the list.

    On the "Create Forms" UX experience, even Anaplan themselves were surprised with the results but we benchmarked and did a demo of it to them and the execution time results were repeatable. Note this was 6 months ago so not sure if Anaplan has optimised it since they became aware. Note that the performance difference becomes more noticeable if the model is already slow (as may be in your case)

    On scenario 2, which is also linked to scenario 1, one of the main problems was that on list insertion, the model was "too connected" that it calculated everything from what customers and products are valid for the promotion, if it overlaps with another promotion, what it's ROI is, etc … even before you've entered any other data. Then when users started entering data such as promotion start/end dates it was taking several seconds for it to complete for each data update.

    Fix 2: We created a new promotions list which was only used at the time you created a new promotion. There were no calculations tied to the fields that had to be entered such as the promotion dates. Once the user had entered all the dates and main details of the promotion, the user had to click on a "Save" button on the UX which would trigger an action to insert a list to the main promotions list with all the details. Note there would still be wait time upon saving but user would have at least entered all the data required already rather than wait 3 to 5 seconds for every field entered. E.g. enter promotion start date then wait 4 seconds to complete then enter promotion end date then wait another 4 seconds again, etc

    Scenario 2 is a more common issue I've encountered so I've learnt not to make models that is "too connected" if I foresee it's likely to cause performance issues. Performing model splits to separate distinct processes is one way to do it as well. For example, a product can go through various cycles

    1. New Product creation
    2. Demand forecast generation for the product
    3. Supply chain manufacturing forecasting
    4. Promotions planning
    5. Product end of life forecasting

    If you placed all that functionality in one model, imagine all the calculations it would have to do at the time you insert a list item for a product. Anaplan would be running demand forecast calculations for it, how much manufacturing is required, how it would impact promotions, up to the point when you are discontinuing the product when you've only created it. I know it seems to go against Anaplan's sell phrase "Connected Planning" but there is a price to pay if the level of connectedness is too high

Answers

  • Dikshant
    Options

    @TristanS Great details and explanation. I would like to know more about how much time difference is there using NUX forms vs adding items to a list via module input and actions? Since with NUX Forms we can add one entry at a time, so what should be the performance impact, I am curious to know as I have not used it extensively yet, but good to know more about it.

  • 1636583
    Options

    Great explanation @TristanS

  • TristanS
    edited March 22
    Options

    @Dikshant had to go through old chats I had on the NUX "Create Form" to get the stats. Mind you insertion got really slow as the promotion list grew and all the calculations it was performing at time of insertion. The stat I got from the chat back in May 2023 was that it took 85 seconds with the NUX "Create Form" vs 40 seconds if we did a list insert via an action/process. So there as a marked 50% improvement on performance. Given that was close to a year ago I wouldn't be surprised if Anaplan had improved the performance of the NUX "Create Form" function. We did other optimisations as well to improve the performance.

  • @TristanS - totally on your 2nd point. We had a model that did P&L along with cost allocation where one of drivers was a value in the gross profit build. So you can guess what was happening there!

    Just broke that link with an import and the problem went away. But wouldn't have realised that without doing a model open analysis. Really powerful piece of activity from Support.

  • Olek P
    Options

    @TristanS super insightful, that explains a lot of the issues I've been having. Also makes me rethink the way I model because of the "too much connectiveness" issue.