AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 13.04.2013, 23:16   #1  
Blog bot is offline
Blog bot
Участник
 
25,477 / 846 (79) +++++++
Регистрация: 28.10.2006
axinthefield: Do not assume, Benchmark your X++ code
Источник: http://blogs.msdn.com/b/axinthefield...your-code.aspx
==============

Some might argue Dynamics AX is an opened source ERP. With the developer license, you can see the whole stack of Microsoft code (SYS and SYP layers), and you can overwrite its core business logic to match your specific needs (VAR or CUS layers). That flexibility is maybe the number one strength of the product, but it can also leads into performance issues if the customized code doesn't match the Microsoft Best Practices.

Premier Field Engineering has the great opportunity to see the product running live and the performance troubleshooting often means doing a code review of all layers. We often demonstrate the need to optimise the code with the 10/10/80% application rule:

  • 10% of the performance can be explained by infrastructure issues like network, disk latency, memory pressure and high utilisation processors
  • 10% by wrong configurations in SQL and AX such as Max degree of Parallelism, database files size and location, AX Database logging and Number Sequences
  • Then 80% can be found its root cause in the business logic X++ code in correlation with index tuning and data modelling.
Writing the customization in X++ to match customer’s requirements is one thing, making sure it is well optimized for high volume transactions and large tables is another one. This is where experience comes into play of course, but here is a great tool for you: Trace Parser!

The latest version of the tool has been released with Dynamics AX 2012 R2 and allows you to analyse AX 2012 ETL trace file but also AX 2009
TRC file.

  • Trace summary: time spent in the database vs. in the application: this is great to confirm
    the 80% rule.
  • SQL queries and X++ Call Stack mapping: this is where you can start the troubleshooting and find the root cause of the latency by looking at the
    queries order by Total Execution Time for example. Please read the previous post from Tom
    Stumpf on the AX tracing.
  • And my favourite, Trace Comparison. It can compare two trace in details and help you to validate the code optimization. The first trace is typically the benchmark and the second trace is the new one to be tested.
Finally I will like to remind developers of the importance of the Best Practices tool. Following its standard rules is mandatory and all error and warning should be resolved before code is promoted into production.

The Premier Field Engineer team delivers Dynamics AX Code Review to help customers and partners assess the customization and
remediate most important findings with code optimization. The Code Review also covers the Best Practice results, Performance improvement (SQL operations with Update_RecordSet and Insert_RecordSet, use of aggregate functions, Join instead of If statement, abusive display methods).

Bottom line: if you have performance issue, leverage Trace Parser to find the root cause. And if you don’t have yet any performance issue, validate your new development with Trace Parser before any release.

Note: you can import both AX 2009 TRC and AX 2012 ETL files into the same Trace Parser. Here are the work around:

  • for AX 2009: Run Mofcomp ax_trace.mof
  • for AX 2012: Copy the two dlls TraceProviderCrimson.dll and TraceProviderCrimson.man
    into the Windows\System32 folder and run wevtutil im TraceProviderCrimson.man



Источник: http://blogs.msdn.com/b/axinthefield...your-code.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Старый 14.04.2013, 12:22   #2  
mazzy is offline
mazzy
Участник
Аватар для mazzy
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии AXAWARD 2013
Лучший по профессии 2011
Лучший по профессии 2009
 
29,472 / 4494 (208) ++++++++++
Регистрация: 29.11.2001
Адрес: Москва
Записей в блоге: 10
а где лежит этот Dynamics AX Code Review?
Старый 14.04.2013, 16:47   #3  
Vadik is offline
Vadik
Модератор
Аватар для Vadik
Лучший по профессии 2017
Лучший по профессии 2015
 
3,631 / 1849 (69) ++++++++
Регистрация: 18.11.2002
Адрес: гражданин Москвы
Цитата:
Сообщение от mazzy Посмотреть сообщение
а где лежит этот Dynamics AX Code Review?
Нигде, это услуга. А Trace parser лежит на диске с AX 2012
__________________
-ТСЯ или -ТЬСЯ ?
Старый 14.04.2013, 22:37   #4  
mazzy is offline
mazzy
Участник
Аватар для mazzy
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии AXAWARD 2013
Лучший по профессии 2011
Лучший по профессии 2009
 
29,472 / 4494 (208) ++++++++++
Регистрация: 29.11.2001
Адрес: Москва
Записей в блоге: 10
Цитата:
Сообщение от Vadik Посмотреть сообщение
Нигде, это услуга.
Реклама, значит... Ну, пусть лежит.
Спасибо.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 10 Blog bot Dynamics CRM: Blogs 0 17.08.2012 03:27
ax-erp: Code that must not be put in data source active() method Blog bot DAX Blogs 2 27.04.2012 18:44
axinthefield: Dynamics AX Event IDs Blog bot DAX Blogs 0 01.03.2011 22:11
CRM DE LA CREME! Some more useful javascripts for MS CRM Blog bot Dynamics CRM: Blogs 0 04.05.2010 11:05
Вопрос про Demand Planner slava09 DAX: Функционал 4 25.09.2006 11:43

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 17:37.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.