• X++ compiler performance is the bottleneck of build and installation scenarios in many organizations • Some simple tricks can be applied to minimize the compilation time (pre cu7) Phase 1 Types and signatures compilation Phase 2 Bodies compilation and p-code generation Phase 3 Phase 2 is re-executed, but only for elements with errors • Metadata is read and validated • X++ source code is converted to p-code and saved • Error logs are created How the Microsoft Dynamics AX compiler works • Compilation happens on the client. • Metadata is exchanged from SQL all the way to the client and back to SQL • Compiler is single threaded • Compilation happens on the • • • • AOS (no metadata exchange) X++ execution during compilation has been reduced (output log) 64 bit process Single threaded compilation ~30% performance boost Parallelization AXBuild.exe is a new stand-alone command line tool, to coordinate multiple AOS in the same box to complete a full compilation in parallel Private AOS Topology with TFS • A private AOS topology is a setup where each developer has his or her own Microsoft Dynamics AX client, AOS instance, model database, and business database. • Artifacts are synchronized between developers using a supported version control system like TFS As needed Periodic Administrator: Setup TFS Administrator: Configure Version Control for AX Development (Build Computer) Administrator: Add Model (s) to Version Control (Build Computer) Administrator: Apply a Label to Latest Version of Source Files Developer: Configure Version Control on Developer Computer Developer: Deploy Build Developer: Check out, Check in and Get Latest Administrator: Create AX Build (Build Computer) Developer: Synchronize to Latest No Yes Need new clean build? 12. Load combined XPOs into AX using ax32Serv.exe Ax32Serv.exe -console 01 -model=@Model.xml -aol="%Layer%" - AOTIMPORTFILE=%xpoFile% nocompile 13. Compile the application using AXBuild.exe ** Configuration • • • • • • • • MorphX client, AOS and SQL Server installed on the same computer. 4 Cores 3.7 GHz. Hyper-Threading enabled, which logically doubles the CPU count. 32 Gigabytes of physical active memory. 6.0 Gigabits/s SATA Controller Windows Server 2012 SQL Server 2012 Enterprise with SP1 (no memory constraint) Windows virtual page caching disabled. Fresh AX 2012 R2, with cu7 installed. • • Compilation using AXBuild.exe running 9 AOS workers: About 12 minutes. Compilation using MorphX client (for comparison): 2 hours and 10 minutes. Both measurements were done using the same hardware and setup. Official documentation for the tool http://msdn.microsoft.com/library/d6da631b-6a9d-42c0-9ffe-26c5bfb488e3.aspx Blog post that explains the architecture of the tool http://blogs.msdn.com/b/axtools/archive/2013/11/04/parallel-x-compilation-for-microsoft-dynamicsax2012-r2-in-cumulative-update-7.aspx • This white paper describes in details tasks and best practices that are related to development life cycle management in Microsoft Dynamics AX 2012. It is located on information source at this link • It focuses on TFS integration, creation of AX builds, and deployment on development environments. link PowerShell gallery Windows www.microsoft.com/dynamics/axtechconference