Skip to main content

Posts

Showing posts with the label Performance

Analyse SQL performance issues using SQL Query Store for D365FO

Someone at work showed me this. With the production environment the Query Store is enabled. So when you bring it back to a sandbox environment. All that information comes with it. If you connect to the database via SQL management studio. Then navigate to the Query Store. There is a lot of great in depth information you could get. I have a customer that has gone live for 3 months and I wanted to see if there were any improvements we could do. Such as missing indexes we could add to our product. I won’t dive in too deep as there are some great resources online on how to utilise Query Store. I should mention a lot of this information shows up summerised on LCS. So that should be your starting point but I am really glad this is available.

KB2996035 - Performance issues when printing 1000s of customer account statements

A bit of a spotlight on this KB. This is not in AX2012R3CU9 but available on LCS for download. When you are printing a large number of customer statements it can take hours to print. This can be cut down dramatically. I don’t have perfect stats but with our testing on a TEST box. It ran 2.5 times faster. Producing over over 3000 statements in 30minutes. I think with better infrastructure we can get much better results. (12GB x 4 Cores test box – was a shared box for other services) The more cores the faster it is. The installer contains 2 KBs in one. The code is generic in nature but requires that you still make a small change to the code. Not sure if this was forgotten. Add this method to the controller class of the report. Final result should show you a new check box “Use parallel processing”. If this is ticked then it will multi thread and the prints will be out of sequence. If you don’t tick or see this flag, you are not multi-threading.

Open journal line form is slow [AX 2012]

I have posted a few times about journal performance. Make sure to have a look at those. This one is specifically about open the journal line form being slow. I tested with a 40,000 line journal.  Opening the form took about 7 minutes. I ran the code profiler against it and found one particular method that took way too long. taxAmountJournal(). It ended up being a display method. This particular display method shows up on the form as “Calculated sales tax amount”. After right click and hiding the field, the load of the form is instant. Same when jumping (focus) from line to line.

KB3034554 - Ledger journal performance [AX 2012]

A bit of a spotlight on this KB. I wasn’t aware of for some time and now it is included in AX2012R3CU9. Problem was that each line insert/update/delete caused a tax calculation. This was more prominent when importing large journals (several thousand lines). The solution Microsoft provides in this KB is a technical solution. It gives you the ability to ignore tax calculations if you wanted to do it while importing (via AIF or custom code). I have written something previously that discusses this. http://dynamicsnavax.blogspot.com.au/2014/04/tips-to-improve-ledger-journal-import.html   https://fix.lcs.dynamics.com/Issue/Resolved/616114?kb=3034554&bugId=3360809&qc=0872aea67f72bae9e4f30e1e2f653e6071a7556b6589633dd4fdf521cd720f5b Note: This new field is not part of the DIXF journal entity. Here is a work around. Because the Fields in the query are set to Dynamic=No. Lets add it ourselves Right click and add the field. Refresh the target entity by either deleti...

Multithreading with Business Operation Framework [AX 2012]

In this post I will discuss the basics of multi threading with business operations framework and I will provide a sample you can work with. Multithreading can give you a huge performance boost if you could spin each process separately. The biggest hurdle with writing a process to work via multi threading can be a little confusing and time consuming to develop. So, what I have done is create a generic xpo project which I have used many times as a starting point. Below is a screenshot of what the net result is of my sample project. The xpo contains the following project. Download xpo The \Classes\Processor\process method is the main entry method. If it is run with out the batch it will execute each record separately. Otherwise, if it is run in batch it will bundle the records based on a default bundle size (I have set it to 10). I then use a list to store the 10 customer recIds. The reason I bundle the records is because when you multithread, you may not want to process each r...

Tips to improve Ledger journal import performance [AX 2012]

There are a number of ways of importing ledger journals but with most you will realise it is quite slow with a lot of lines (100 plus lines). I have put a couple of tips to boost the performance. Remember these are bulk creation of journals and not posting issues. That is a whole other topic. Tip 1. Obvious but often forgotten. Remember that journal name setup – you have a number of options to generate the voucher number. If you leave it to generate when it balances – then this will kill your performance. Tip 2. On the insert method you will there is tax calculations which are deleted and recalculated every time you insert. If you can avoid calling this method and call it only for the last line per unique journal number, voucher number, and invoice. I won’t go into detail on how to code it. option 1: You can add a parameter and check that. option 2: Or you can write your code so the tax is not set – do your insert. Then set the tax groups after. But remember you will have to...