मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)5.8k · #14573

analyzing-dotnet-performance

यह क्या करती है

यह स्किल .NET code को ज्ञात प्रदर्शन समस्याओं के लिए जाँचती है और हर एक को ठीक करने का तरीका समझाती है। यह उन डेवलपर के लिए है जो release से पहले धीमा या memory-भारी code पकड़ना चाहते हैं।

कब इस्तेमाल करें

  • ✓जब आप .NET codebase या hot code path की प्रदर्शन समस्याओं के लिए समीक्षा चाहें।
  • ✓जब आप ऐसे code का ऑडिट चाहें जो बहुत memory allocate करता है।
  • ✓जब मैनुअल प्रदर्शन समीक्षा के बाद आपको दूसरी राय चाहिए।

Skill का लिंक

https://github.com/dotnet/skills/blob/main/plugins/dotnet-diag/skills/analyzing-dotnet-performance/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/dotnet/skills/blob/main/plugins/dotnet-diag/skills/analyzing-dotnet-performance/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“इस C# सेवा के hot paths में प्रदर्शन समस्याएँ जाँचिए और सुधारों को असर के हिसाब से रैंक कीजिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट code पढ़ता है, उसे प्रदर्शन anti-patterns की सूची से मिलाता है, और ठोस सुधारों के साथ प्राथमिकता वाले निष्कर्ष देता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

.NET Performance Patterns

Scan C#/.NET code for performance anti-patterns and produce prioritized findings with concrete fixes. Patterns sourced from the official .NET performance blog series, distilled to customer-actionable guidance.

When to Use

  • Reviewing C#/.NET code for performance optimization opportunities
  • Auditing hot paths for allocation-heavy or inefficient patterns
  • Systematic scan of a codebase for known anti-patterns before release
  • Second-opinion analysis after manual performance review

When Not to Use

  • Algorithmic complexity analysis — this skill targets API usage patterns, not algorithm design
  • Code not on a hot path with no performance requirements — avoid premature optimization

Inputs

Input Required Description
Source code Yes C# files, code blocks, or repository paths to scan
Hot-path context Recommended Which code paths are performance-critical
Target framework Recommended .NET version (some patterns require .NET 8+)
Scan depth Optional critical-only, standard (default), or comprehensive

Workflow

Step 1: Load Critical Reference

Resolve bundled paths from the directory that contains this SKILL.md, not from the user's workspace. Load this reference file first:

  • references/critical-patterns.md

If a direct read fails, list this skill's references/ directory once and retry only when the listing shows the expected file. Do not use workspace file or text search to locate the skill installation.

Step 2: Detect Code Signals and Select Topic Recipes

Scan the code for signals that indicate which pattern categories to check. Use the ## Detection section from the critical reference when available and the inline recipes in Step 3 for initial signal detection.

After detecting signals, load only the topic-specific references selected by scan depth:

  • critical-only: No additional references (use only critical-patterns.md)
  • standard (default): Load references matching detected signals from this list:
    • references/async-patterns.md — async/Task/ValueTask signals
    • references/memory-and-strings.md — Span/Memory/string allocation signals
    • references/regex-patterns.md — Regex signals
    • references/collections-and-linq.md — Dictionary/List/LINQ signals
    • references/io-and-serialization.md — JsonSerializer/HttpClient/Stream signals
    • references/structural-patterns.md — always loaded (unsealed classes checked regardless)
  • comprehensive: Load all six topic-specific references above

For coverage reporting, the selected references are references/critical-patterns.md plus only the topic-specific references selected above. If any selected reference remains unavailable after retry, use the inline recipes in Step 3 for the missing coverage. Include Reference coverage: reduced; unavailable: <paths>; used inline recipes for missing references. in the final report, with <paths> replaced by the missing relative paths of the selected references only.

Use the ## Detection sections from loaded reference files and the inline recipes in Step 3 for categories whose reference files are unavailable.

Signal in Code Topic
async, await, Task, ValueTask Async patterns
Span<, Memory<, stackalloc, ArrayPool, string.Substring, .Replace(, .ToLower(), += in loops, params Memory & strings
Regex, [GeneratedRegex], Regex.Match, RegexOptions.Compiled Regex patterns
Dictionary<, List<, .ToList(), .Where(, .Select(, LINQ methods, static readonly Dictionary< Collections & LINQ
JsonSerializer, HttpClient, Stream, FileStream I/O & serialization

Always check structural patterns (unsealed classes) regardless of signals.

Scan depth controls scope:

  • critical-only: Only critical patterns (deadlocks, >10x regressions)
  • standard (default): Critical + detected topic patterns
  • comprehensive: All pattern categories

Step 3: Scan and Report

For files under 500 lines, read the entire file first — you'll spot most patterns faster than running individual grep recipes. Use grep to confirm counts and catch patterns you might miss visually.

For each relevant pattern category, run the detection recipes below. Report exact counts, not estimates.

Core scan recipes (run these when reference files aren't available):

# Strings & memory
grep -n '\.I
अक्सर पूछे जाने वाले सवाल

क्या यह algorithms जाँचती है?

नहीं। यह देखती है कि APIs कैसे इस्तेमाल होते हैं, algorithm की जटिलता नहीं।

क्या मैं scan की गहराई तय कर सकता हूँ?

हाँ। scan को सिर्फ़ गंभीर समस्याओं, मानक या पूरी समीक्षा तक सीमित किया जा सकता है।

क्या इसे hot paths पता होने चाहिए?

इनके साथ यह बेहतर काम करती है, क्योंकि hot path पर न होने वाले code में बदलाव ज़रूरी नहीं हो सकता।

जानकारी

लेखक का मूल विवरण

Scans .NET code for ~50 performance anti-patterns across async, memory, strings, collections, LINQ, regex, serialization, and I/O with tiered severity classification. Use when analyzing .NET code for optimization opportunities, reviewing hot paths, or auditing allocation-heavy patterns.

repo: dotnet/skills

लोकप्रियता

GitHub स्टार
5.8k
रैंकिंग में स्थान
#14573
लाइसेंस
MIT
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills