This document describes the new interactive features added to the Java Heap Dump Analyser.
The analyzer now provides clickable insights for all major views, making it easier for users to:
- Understand what each class does
- Identify common memory issues
- Get direct links to resolution guides
- Know exactly what to fix and in what priority
- All class rows are now clickable - Click any class name in the histogram table
- Hovering over rows shows a light blue highlight to indicate they're interactive
- Each row displays a tooltip: "Click for detailed insights"
A modal window opens with comprehensive information:
- Instance count
- Total size
- Heap percentage
- Visual statistics grid
- For well-known Java classes (String, HashMap, Thread, etc.): Detailed description of the class purpose
- For pattern-matched classes (ClassLoader, Listener, Cache, etc.): Pattern-specific information
- For custom classes: Generic guidance on memory management
- Specific issues known to affect this class type
- Real-world scenarios where these issues occur
- Why these issues cause memory leaks
- Step-by-step resolution strategies
- Best practices for avoiding the issue
- Configuration recommendations
- Direct links to official Java documentation
- Links to memory leak guides and tutorials
- References to established sources (Baeldung, Oracle, etc.)
Every modal includes links to:
- Eclipse Memory Analyzer (MAT)
- VisualVM
- Java Memory Leaks Guide
- Contextual tips based on instance count and retained size
- Guidance on next steps for deeper analysis
The knowledge base includes detailed information for:
Core Java Classes:
java.lang.Stringjava.util.HashMapjava.util.ArrayListjava.util.HashSetjava.lang.Threadjava.lang.ThreadLocalchar[]andbyte[]arrays
Pattern-Based Recognition:
- Classes ending in
ClassLoader(critical severity) - Classes ending in
Listener(medium severity) - Classes matching
.*Cache.*pattern - Classes matching
.*Connection.*|.*Statement.*|.*ResultSet.*(JDBC resources) - Classes matching
.*Logger.*|.*Appender.*(logging frameworks) - Classes in
java.util.concurrent.*package
- All class rows are now clickable - Click any class name in the dominator tree table
- Same modal interface as Histogram tab
- Additionally shows retained size information in the modal
- Understand why a class has high retained size
- See which patterns might be causing retention issues
- Get specific guidance for reducing retained memory
- All suspect class names are now clickable
- Click to see detailed information about the leaked class
- Class names change color and underline on hover
Added a comprehensive "📖 Memory Leak Resources" section with direct links to:
-
Eclipse Memory Analyzer (MAT)
- Industry-standard heap dump analyzer
- Advanced features for professional analysis
-
VisualVM
- Visual monitoring and troubleshooting tool
- Real-time analysis capabilities
-
Java Memory Leaks Guide (Baeldung)
- Comprehensive tutorial
- Covers all common leak patterns
-
Oracle Memory Leak Troubleshooting
- Official documentation
- Authoritative guidance from Java creators
-
DZone Memory Leak Tutorial
- Practical step-by-step guide
- Real-world examples and solutions
Added new patterns for detection:
- ThreadLocal Leak: Specific detection for ThreadLocal issues
- Cache Growth: Identifies caching implementations
- Database Resource Leak: Detects JDBC resource issues
- More specific, actionable recommendations with emoji indicators
- Priority-based ordering (🔴 Critical,
⚠️ Warning, 💡 Info) - Better context for each recommendation
Example recommendations:
- "🔴 Critical: Classloader leaks detected. Review application lifecycle..."
- "
⚠️ High string retention detected. Review batch processing, logging..." - "
⚠️ ThreadLocal usage detected. Always call ThreadLocal.remove()..." - "💡 Multiple high-severity issues found. Prioritize fixing critical..."
-
ClassDetailsModal.jsx - Responsive modal component
- Keyboard navigation (ESC to close)
- Click outside to close
- Mobile-responsive design
- Smooth animations
-
classKnowledgeBase.js - Comprehensive knowledge database
- 15+ specific class definitions
- 7+ pattern matchers
- Links to 20+ external resources
- Extensible architecture
- Clickable row styling with hover effects
- Modal animations and transitions
- Mobile-responsive layouts
- Accessibility considerations
- Consistent interaction patterns across all tabs
- Clear visual feedback (cursor changes, hover effects, tooltips)
- Fast, client-side only (no network requests)
- Keyboard accessible
- Users saw class names and numbers but didn't know what they meant
- Had to manually research each class
- Unclear what action to take
- No prioritization guidance
- Instant insights on any class with one click
- Direct links to authoritative documentation
- Clear action items with priority indicators
- Complete context for making decisions
- Self-service troubleshooting without leaving the app
Potential additions based on this foundation:
- Export detailed reports with insights
- Custom knowledge base entries
- Historical comparison of heap dumps
- AI-powered insight generation
- Integration with monitoring tools
- All insights are client-side
- No data sent to external services
- Links only open when user clicks them
- Knowledge base is embedded in the application
- Modal rendering is lazy (only when opened)
- Knowledge base lookup is O(1) for exact matches
- Pattern matching is efficient with compiled regexes
- No impact on heap dump parsing performance
The knowledge base is designed to be easily extended:
// Add new class information
CLASS_KNOWLEDGE['com.mycompany.MyClass'] = {
description: '...',
commonIssues: [...],
resolutions: [...],
links: [...]
};
// Add new pattern
CLASS_PATTERNS['.*MyPattern.*'] = { ... };