XrmToolSuite.JavaScriptPerformanceAnalyzer 1.2026.7.11

dotnet add package XrmToolSuite.JavaScriptPerformanceAnalyzer --version 1.2026.7.11
                    
NuGet\Install-Package XrmToolSuite.JavaScriptPerformanceAnalyzer -Version 1.2026.7.11
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XrmToolSuite.JavaScriptPerformanceAnalyzer" Version="1.2026.7.11" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="XrmToolSuite.JavaScriptPerformanceAnalyzer" Version="1.2026.7.11" />
                    
Directory.Packages.props
<PackageReference Include="XrmToolSuite.JavaScriptPerformanceAnalyzer" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add XrmToolSuite.JavaScriptPerformanceAnalyzer --version 1.2026.7.11
                    
#r "nuget: XrmToolSuite.JavaScriptPerformanceAnalyzer, 1.2026.7.11"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package XrmToolSuite.JavaScriptPerformanceAnalyzer@1.2026.7.11
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=XrmToolSuite.JavaScriptPerformanceAnalyzer&version=1.2026.7.11
                    
Install as a Cake Addin
#tool nuget:?package=XrmToolSuite.JavaScriptPerformanceAnalyzer&version=1.2026.7.11
                    
Install as a Cake Tool

⚡ JavaScript Performance Analyzer

An XrmToolBox plugin that statically scans JS web resources — fully offline, no runtime is executed — for performance and deprecation risks, maps scripts to the forms and events that call them, scores each script, and exports the findings. Read-only. Findings are labeled heuristics: every regex finding carries a 1-based line number, the trimmed source line as context, and an explicit confidence note.

Features

Area What it analyzes
Web resource inventory JScript webresource rows (webresourcetype = 3) loaded off the UI thread in two phases: a lightweight name-only listing, then script bodies downloaded in small chunks (10 per request, with a per-record fallback) with progress and cancellation — retrieving every base64 body in one paged query used to exceed the gateway response limit on large orgs (long hang, then 502 Bad Gateway). A ranked grid shows name, decoded size, band, score and finding count; a search box filters scripts by code content
Scope filters Custom only toggle (default on) scans only unmanaged web resources — skipping the thousands of Microsoft/managed system libraries (AppCommon/…, Activities/…) most orgs carry; an Exclusions… dialog drops web resources whose name starts with any of a comma-separated prefix list (e.g. msdyn_, AppCommon/). Both apply before content download, so filtered scripts cost nothing; both persist in settings — re-run the analysis to apply
Static code rules Deprecated Xrm.Page → Medium; synchronous XMLHttpRequest (open(...,false) / async:false) → High; blocking alert( in form logic → High; excessive console.* (default > 10) → Low; repeated retrieve/retrieveMultiple/Xrm.WebApi (default > 3) → Medium; hardcoded GUIDs and absolute URLs → Medium; direct DOM access (getElementById/querySelector/window.parent) → Medium. Whole-line comments are skipped
Form & event mapping FormXML <events>/<Handlers> parsed into library → form → event (OnLoad/OnChange/OnSave) links; selecting a script shows its form/event usage panel; forms with too many OnLoad handlers (default > 5) → Medium
Code pane The read-only source view has a line-number gutter (matching the findings' Line column) and normalizes newlines so scripts saved with Unix \n display correctly instead of collapsing onto one line
Score & dashboard A 0–100 performance score per script (capped) with a Low/Medium/High band (thresholds 15/40); a clean script yields a single Info note and score 0; a dashboard summarizes band counts and the worst scripts. Each finding carries a refactoring recommendation

The static rule engine and FormXML event mapper are UI-free (CI-liftable) and covered by the SDK-free unit tests; the live SDK collector is manual-tested.

Exports

Excel, PDF, JSON, HTML, Markdown, and CSV. Excel/PDF/JSON come from the shared reporting module; HTML/Markdown/CSV from small BCL writers. The SaveFileDialog runs off the analysis thread.

Help & Support

A Help button (right of the toolbar) opens a Help & Support dialog with Documentation, Report an issue, and a support link, each opened via Process.Start. The control implements IHelpPlugin and IGitHubPlugin, so XrmToolBox's own tool-menu links resolve to the same GitHub project (kkora/XrmToolSuite).

Build & install

On the machine that runs XrmToolBox, build straight into the Plugins folder:

dotnet build src\Tools\XrmToolSuite.JavaScriptPerformanceAnalyzer\XrmToolSuite.JavaScriptPerformanceAnalyzer.csproj -c Release -p:DeployToXTB=true

Restart XrmToolBox and open JavaScript Performance Analyzer.

This tool is not single-DLL: it ships the Excel/PDF export dependency chain — the tool DLL plus its 17 ClosedXML/PdfSharp-MigraDoc-GDI dependency DLLs — flat in the Plugins root (never a subfolder), or XrmToolBox silently drops it from the Tools list. The one-step build above copies the whole chain for you.

See ./DEPLOYMENT.md for manual-install steps and troubleshooting, and the suite-wide Deployment_Guide_XrmToolBox.md for the full DLL list and export-tool guidance.

Usage

  1. Connect to your Dataverse environment (System Customizer or higher recommended).
  2. Load the JS web resources — the ranked grid populates with size, band, score and finding count.
  3. Select a script to see its findings (with line context and confidence) and its form/event usage.
  4. Review the dashboard for band counts and the worst scripts; use the search box to find patterns.
  5. Export to Excel, PDF, JSON, HTML, Markdown, or CSV.

Notes & limitations

  • Read-only and fully offline — no script is executed; all analysis operates on decoded strings.
  • Findings are labeled heuristics: regex/line scans may match comments or string literals, so each finding carries a confidence note plus its 1-based line and trimmed source context.
  • Thresholds (console count, repeated retrieves, OnLoad handlers) are configurable; the last search persists via settings.
Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2026.7.11 99 7/11/2026
1.2026.7.10 94 7/11/2026
1.2026.7.9 106 7/11/2026
1.2026.7.8 109 7/11/2026
1.2026.7.7 104 7/11/2026
1.2026.7.6 100 7/10/2026
1.2026.7.5 107 7/9/2026
1.2026.7.3 108 7/7/2026

1.2026.7.11: Two-phase chunked web-resource collection (fixes 502 Bad Gateway on large orgs); Custom-only toggle and name-prefix Exclusions; line-number gutter in the code pane.