fredag den 20. februar 2015

The Code Profiler in Dynamics AX

The Code Profiler in Dynamics AX is a powerful tool for finding performance issues in the application.

But it can also be a little difficult to use simply just because of the overwhelming amount of data it creates, so sometimes it's nice to limit the amount of code it runs on.

This is where the macro #profileBegin comes in really handy.

If you already know the place in your code that runs slow, you can put in the macro before and after, and then the profiler only runs on that piece of code.

       public void  printJournal(Set _journalList)
            . Cut out code
                   #profileBegin("printJournal")    // RSH Start profiling code
                   #profileEnd                      // RSH End profiling code

Now you only profile the code you actually need to measure, and not allot of unnecessary code.

Ingen kommentarer:

Send en kommentar