web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Code Optimization which things need to be covered?

(0) ShareShare
ReportReport
Posted on by 30

Hi,

Please let me know for Code Optimization which things need to be covered? So, that code will get execute smoothly. 

Please give me more shed on this 

I have the same question (0)
  • @rp@n Profile Picture
    30 on at

    Can anyone please help me on this

  • Verified answer
    WillWU Profile Picture
    22,361 on at

    Hi @rp@n,

    Are you facing performance issues currently?

    Please make sure your customized codes match the Microsoft Best Practices.

    docs.microsoft.com/.../best-practice-overview

    Trace parser can help you identify performance bottlenecks, such as long-running X++ methods, time-consuming SQL queries, please refer to: docs.microsoft.com/.../trace-parser

  • @rp@n Profile Picture
    30 on at

    Yes Will,

    The code written by someone. And I unable to understand where is the issues. So, inam asking how I will optimise the code. 

    Shall I talk first with functional consultant  for which purpose they ask the developer to do the custamization.  So, that i will get idea on the functionality. 

    Then I will check the code, and BP deviation etc...

    And finally debug the code 

    Is it right approach?

    Please give me more shed on this 

  • WillWU Profile Picture
    22,361 on at

    Hi @rp@n,

    Does this code work correctly now?

    Are you now working on code refactoring?

    Yes, you must first understand the function of the current custom code, it would save a lot of time if there was any documentation available at that time.

    If there are any comments in the old code, you can also check it to understand the developer's intent.

  • @rp@n Profile Picture
    30 on at

    Thanks Will,

    That I am surprised! Not doing any documentation. Comment is like only name and creation date etc...

    How I will understand the code? 

    Yes here code refactoring means I need to add some logic but before i have to understand the functionality. What is the purpose for this development?

    Then will check bp deviation and finally debugging. If required.

    Is it right approach?

  • Verified answer
    Martin Dráb Profile Picture
    237,882 Most Valuable Professional on at

    The first step of dealing with performance problem is measuring what's wrong. You usually don't find the problem just by looking into code. Also, the measurement will allow you to test the impact of your changes on performance.

    Therefore you must learn how to use at least some tools for performance measuring. Here are some of them. As always, you can find more information by using a search engine.

    Understanding what the code does it obviously important, but you can't seriously expect us to tell you what's the purpose of this code, because we've never seen it.

    The topic of code refactoring and change adding isn't related to performance optiomization. If you want to discuss it, please create a new thread (with an appropriate title and tags) and explain your problem in detail there.

  • @rp@n Profile Picture
    30 on at

    Thanks Martin

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 565 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans