Installation

Usage Guides

Reference

Commands

Language Server

MCP Server

Benchmarks

TL;DR: CEM’s Go implementation is significantly faster than JavaScript-based tools. Generate benchmarks show ~10x speedup over web-component-analyzer. LSP benchmarks demonstrate sub-millisecond response times for autocomplete and validation.

Overview

CEM provides two types of benchmarks for comprehensive performance analysis:

Generate Tool Benchmarks

Performance comparison of custom element manifest generation tools.

Number of runs per tool: 100
Number of files analyzed per run: 45

Generate tool benchmark results: lower is better (seconds)
: 1.47@lit-labs/cli1.47: 0.83@custom-elements-manifest/analyzer0.83: 0.34cem generate0.34

@lit-labs/cli

Docs
1.47s
Avg Time
52.3KB
Avg Output Size
100
Runs
Valid
Validation

Command

npx --yes @lit-labs/cli labs gen --manifest --out data/lit
Run Breakdown: Time per Run (seconds)
1.441.491.541.581.631.681100Run #

Validation Results

No validation issues found - The generated manifest is valid and follows all best practices.

@custom-elements-manifest/analyzer

Docs
0.83s
Avg Time
66.1KB
Avg Output Size
100
Runs
Valid
Validation

Command

npx --yes @custom-elements-manifest/analyzer analyze --outdir data/cea --globs benchmark/components/*.ts
Run Breakdown: Time per Run (seconds)
0.800.810.820.830.850.861100Run #

Validation Results

No validation issues found - The generated manifest is valid and follows all best practices.

cem generate

Docs
0.34s
Avg Time
73.6KB
Avg Output Size
100
Runs
Valid
Validation

Command

cem generate -o data/cem/custom-elements.json benchmark/components/*.ts
Run Breakdown: Time per Run (seconds)
0.330.330.340.340.340.351100Run #

Validation Results

No validation issues found - The generated manifest is valid and follows all best practices.

LSP Server Benchmarks

Last benchmark run:

HTML File Operations

Pure LSP protocol timing in .html files. Each benchmark measures the time from LSP request to response completion, using multiple iterations to calculate statistical distributions (mean, median, P95, P99).

Server StartupCEM: 2.97ms2.97mswc-toolkit: 3.02ms3.02msHover Info(290 chars)(505 chars)CEM: 0.44ms0.44mswc-toolkit: 1.27ms1.27msAutocompletion(122.0 items)(130.3 items)CEM: 1.83ms1.83mswc-toolkit: 2.28ms2.28msDiagnosticsCEM: 5038.04ms5038.04mswc-toolkit: 5031.45ms5031.45msFind ReferencesCEM: 29.47ms29.47mswc-toolkit: 1.93ms1.93msCEM LSPwc-toolkit