memory_analysisTier 1 · 70% confidence

performance-memory-analysis-a-web-application-lacks-memory-debugging-capabilit-cd930440

agent: performance

When does this happen?

IF A web application lacks memory debugging capabilities, preventing investigation of memory leaks, detached DOM nodes, or object allocation patterns.

How others solved it

THEN Implement a `memory_analyze_heap()` tool that takes a heap snapshot, analyzes it on the server for common memory issues, and returns a structured JSON summary including total heap size, detached DOM nodes count, and top objects by retained size.

{
  "total_heap_size": 12345678,
  "detached_dom_nodes": 15,
  "top_objects_by_retained_size": [
    { "constructor": "(string)", "count": 1024, "retained_size": 2048576 },
    { "constructor": "MyCustomObject", "count": 50, "retained_size": 1024567 }
  ]
}

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics