Code Optimisations

infonoteinfonote Member Posts: 233
Hi,

A lot of C/AL performance guides state that FIND('-') should be replaced with FINDFIRST, FIND('+') with FINDLAST and
FIND('-') followed by a REPEAT should be replaced with FINDSET.

The question is:
Why isn't this applied in standard NAV object? Is there a reason for this?

I am sure there will be improvements in performance and a decrease in locking issues if new versions of NAV has the optimised code.

Thanks in advance

Comments

  • AndwianAndwian Member Posts: 627
    infonote wrote:
    Why isn't this applied in standard NAV object? Is there a reason for this?
    I guess it is because the FINDSET is introduced after NAV 5 SP1 maybe?
    And maybe there will be much efforts in the Development Team to "upgrade" the code into the new efficient one, while they have to released the product to the market, following the Marketing dead line.
    Regards,
    Andwian
  • kinekine Member Posts: 12,562
    And the blind replacement is not optimal in all cases. There are discussions when the FINDSET is better than FIND('-') and when not. This was changed when in NAV 2009 the default set size is 50 instead 500 etc. I think that the main reason is the golden rule "do not touch something what is working".
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • krikikriki Member, Moderator Posts: 9,110
    And it would be too much work to change all in one go (everything should be rested). So Microsoft is only changing them where are reworking the code (or creating new code).
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.