Boost Your X++ Development VM Performance by 2x

Boost Your X++ Development VM Performance by 2x

While developing X++ on CHE, I noticed that AOS restarts were painfully slow after each X++ compilation. This was happening despite having a correctly configured VM with a v5 CPU, 15 HDDs, and a recent setup using VS2022 and version .40.

After investigating, I identified the issue: the "Build metadata cache when AOS starts" parameter was enabled in the System parameters form(System administrator → Setup → System parameters)

The Solution

Disabling this parameter led to a dramatic improvement in restart times. Here's how I tested and measured the improvement:

  1. Run a project rebuild in Visual Studio
  2. Click the Refresh button in the browser
  3. Measure the time between clicking Refresh and when the form fully reloads

Results:

  1. With "Build metadata cache when AOS starts" ON: ~120 seconds
  2. With "Build metadata cache when AOS starts" OFF: ~70 seconds

That's nearly a 2x speed improvement!

Automating the Fix

To ensure this optimization persists, I've updated my Tier2 DB restore script. You can find the new line of code here: TRUDScripts on GitHub.

UPDATE SystemParameters SET ODataBuildMetadataCacheOnAosStartup = 0        

Enjoy the Speed Boost!

Give it a try and enjoy your newly turbocharged X++ development environment. Happy coding!


Karen Tabatini

Head Of Technology @ ateliware

5 个月
Alex Voytsekhovskiy

Technical Architect with 16 years in Microsoft D365FO/AX

5 个月

Someone forgot to switch it off? :) Nice finding! Thank you

回复
Aitor Rescalvo Ribes

Microsoft Dynamics 365 F&O Technical Architect in DQSconsulting

5 个月

Hello Denis Trunin, but this check don't come as off by default? I just checked like 4 difference VM and its off in all of them. Thanks!

回复
Imam Muflihul Rifki

????????Technical Consultant AX 2012 | D365 F&O | D365 BC | NAV | .Net

5 个月

Insightful

回复
Torben Nehmer

ERP and Cloud Solution Architect, Technology Evangelist, FastTrack Recognized Solution Architect (F&O)

5 个月

Hi Denis Trunin, from a fellow architect, have you tested on adverse effects on the OData interface? If the cache isn't built, do OData accesses refresh it on demand, or is there a possibility for it to show outdated metadata. The later could lead to subtle errors which might be hard to recognize. Especially if you disable the flag and then forget about it. Out of curiosity and to clarify, your CHE, with what type of disk did you provision it, real HDDs, or did you use SDD Storage for your disks?

要查看或添加评论,请登录

Denis Trunin的更多文章

社区洞察

其他会员也浏览了