File contents Memory Optimization
Table of Contents
Overview
Memory optimization improves application performance, stability, and reduces infrastructure costs. Efficient memory usage is critical for scalability.
When to Use
High memory usage
Memory leaks suspected
Slow performance
Out of memory crashes
Scaling challenges
Quick Start
Minimal working example:
// Browser memory profiling
// Check memory usage
performance.memory: {
jsHeapSizeLimit: 2190000000, // Max available
totalJSHeapSize: 1300000000, // Total allocated
usedJSHeapSize: 950000000 // Currently used
}
// React DevTools Profiler
- Open React DevTools → Profiler
- Record interaction
- See component renders and time
- Identify unnecessary renders
// Chrome DevTools
1. Open DevTools → Memory
2. Take heap snapshot
3. Compare before/after
4. Look for retained objects
5. Check retained sizes
// Node.js profiling
node --inspect app.js
// Open chrome://inspect
// ... (see reference guides for full implementation)
Reference Guides
Detailed implementations in the references/ directory:
Guide
Contents
Memory Profiling
Memory Profiling
Memory Leak Detection
Memory Leak Detection
Optimization Techniques
Optimization Techniques
Monitoring & Targets
Monitoring & Targets
Best Practices
✅ DO
Follow established patterns and conventions
Write clean, maintainable code
Add appropriate documentation
Test thoroughly before deploying
❌ DON'T
Skip testing or validation
Ignore error handling
Hard-code configuration values
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1 --- 2 name: aj-geddes-useful-ai-prompts-memory-optimization 3 description: Memory Optimization 4 --- 5 6 # Memory Optimization 7 8 ## Table of Contents 9 10 - [Overview](#overview) 11 - [When to Use](#when-to-use) 12 - [Quick Start](#quick-start) 13 - [Reference Guides](#reference-guides) 14 - [Best Practices](#best-practices) 15 16 ## Overview 17 18 Memory optimization improves application performance, stability, and reduces infrastructure costs. Efficient memory usage is critical for scalability. 19 20 ## When to Use 21 22 - High memory usage 23 - Memory leaks suspected 24 - Slow performance 25 - Out of memory crashes 26 - Scaling challenges 27 28 ## Quick Start 29 30 Minimal working example: 31 32 ```javascript 33 // Browser memory profiling 34 35 // Check memory usage 36 performance.memory: { 37 jsHeapSizeLimit: 2190000000, // Max available 38 totalJSHeapSize: 1300000000, // Total allocated 39 usedJSHeapSize: 950000000 // Currently used 40 } 41 42 // React DevTools Profiler 43 - Open React DevTools → Profiler 44 - Record interaction 45 - See component renders and time 46 - Identify unnecessary renders 47 48 // Chrome DevTools 49 1. Open DevTools → Memory 50 2. Take heap snapshot 51 3. Compare before/after 52 4. Look for retained objects 53 5. Check retained sizes 54 55 // Node.js profiling 56 node --inspect app.js 57 // Open chrome://inspect 58 // ... (see reference guides for full implementation) 59 ``` 60 61 ## Reference Guides 62 63 Detailed implementations in the `references/` directory: 64 65 | Guide | Contents | 66 |---|---| 67 | [Memory Profiling](references/memory-profiling.md) | Memory Profiling | 68 | [Memory Leak Detection](references/memory-leak-detection.md) | Memory Leak Detection | 69 | [Optimization Techniques](references/optimization-techniques.md) | Optimization Techniques | 70 | [Monitoring & Targets](references/monitoring-targets.md) | Monitoring & Targets | 71 72 ## Best Practices 73 74 ### ✅ DO 75 76 - Follow established patterns and conventions 77 - Write clean, maintainable code 78 - Add appropriate documentation 79 - Test thoroughly before deploying 80 81 ### ❌ DON'T 82 83 - Skip testing or validation 84 - Ignore error handling 85 - Hard-code configuration values 86 87 --- 88 > Converted and distributed by [TomeVault](https://tomevault.io/claim/aj-geddes) — claim your Tome and manage your conversions. 89 <!-- tomevault:4.0:skill_md:2026-04-11 -->
tomevault-io/skills-registry/tree/main/aj-geddes--useful-ai-prompts--memory-optimization commit 75fc86ec6f
Frequently asked questions How do I install the Aj Geddes Useful AI Prompts Memory Optimization skill? Run npx skillmds@latest add tomevault-io/aj-geddes-useful-ai-prompts-memory-optimization in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Aj Geddes Useful AI Prompts Memory Optimization skill do? Memory Optimization It is listed under Coding & Dev Tools on SkillMD.
Is Aj Geddes Useful AI Prompts Memory Optimization safe to use? This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Aj Geddes Useful AI Prompts Memory Optimization? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Aj Geddes Useful AI Prompts Memory Optimization free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Aj Geddes Useful AI Prompts Memory Optimization? tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.