Which approach is better? (Related to Text, Lists and Formulas)

Hi Everyone,

 

I have a module which is dimensioned by one list. It has around 60k items. In this module there is one line item (Main_Text). I want to pull a string from this Main_Text line item and then use Finditem() function over that string.

Right now, the approach that I am using is to calculate them in two different line item. The second approach is to combine these two line items into one. (See the attached screenshot for better understanding)

Which one is better? 

Please provide your insights based on some valid sources like Best Practices, Planual and Model Optimisation.

I would especially like to hear @Misbah , @ryan_kohn , @KirillKuznetsov , @JaredDolich , @ManjunathKN opinion on both of the approach.

Thanks!

- Shubham Chaudhary

 

P.S.:- There are 5 different piece of info in that Main_Text so approach 1 will have 10 line items and Approach 2 will have 5 line items.

Screenshot 2022-10-18 at 10.08.47 PM.png

Best Answers

  • Misbah
    Answer ✓

    @ShubhamCh 

     

    First one is better in terms of Performance of the model.

    Second one is better too but in terms of space optimization but it may lead to degraded performance.

    It all depends on what are you trying to achieve. If I was you I would do it in multiple line items so that I don't compromise on Performance of the model with just a trade off of some space.

     

    Thanks,

    Misbah

    Miz Logix

  • Hi @ShubhamCh 

     

    It depends on the Size of the list to decide on which approach is better. If the number of List items are less then second approach is better.

     

    If the number of list items are more then either of both approaches basis on certain criteria's.

     

    I personally would go to first approach the reason is very simple although you have staged the data in different line items, your finditem calculation will not be heavy as you are referring the text line item and not calculating again. Your threads are one to one here. And Make sure to put isnotblank if your finditem has any blanks in text part. 

     

    Second approach is better here only when you already know that you used too many text line items in model and size of the model is already big.

     

    Thanks,
    Manjunath

  • ryan_kohn
    Answer ✓

    This is covered in the Data Hubs: Purpose and peak performance best practice article, in the section on loading data vs. using formulas in SYS modules. In summary, both options are good, but splitting into multiple line items is slightly faster based on the tests made in the article.

Answers