Analysis Optimization
Exclude Unnecessary Projects
Use Class-Level Analysis
Method-level analysis dramatically increases graph size:| Level | Typical Node Count |
|---|---|
| Namespace | 10-50 |
| Class | 100-1,000 |
| Method | 1,000-50,000 |
Incremental Analysis
After initial analysis, use incremental mode for updates:Layout Optimization
Use GPU Layout
GPU layout is essential for large graphs:| Nodes | CPU Time | GPU Time |
|---|---|---|
| 1,000 | 8s | 1.2s |
| 5,000 | 120s | 4s |
| 10,000 | 600s+ | 12s |
Optimize Layout Parameters
For very large graphs:| Parameter | Large Graph Setting | Effect |
|---|---|---|
barnesHutTheta | 1.5-2.0 | Faster but less accurate |
gravity | 2.0-5.0 | Keeps graph compact |
scalingRatio | 5.0-10.0 | Spreads out dense areas |
Visualization Optimization
Filter in the UI
Use filters to reduce visible nodes:- Hide namespaces: Focus on classes only
- Hide methods: If using method-level analysis
- Filter by namespace: Show one module at a time
- Isolation mode: Focus on a specific node and its connections
Use Isolation Mode
- Select a node of interest
- Press
Ito isolate - Only connected nodes remain visible
- Press
Iagain to exit
Adjust Render Settings
Neo4j Optimization
Memory Settings
For large graphs, increase Neo4j memory:Add Indexes
Ensure indexes exist (CodeGraph creates these automatically):Use Database Projections
For very large graphs, consider analyzing subsets:Splitting Large Solutions
By Module
By Team
If you have team ownership:Performance Benchmarks
Real-world performance on Apple M1 Pro:| Codebase | Nodes | Edges | Analysis | GPU Layout |
|---|---|---|---|---|
| Small app | 200 | 400 | 2s | 0.5s |
| Medium app | 2,000 | 5,000 | 15s | 2s |
| Large app | 10,000 | 30,000 | 60s | 12s |
| Roslyn | 50,000 | 150,000 | 300s | 45s |
Troubleshooting
Analysis runs out of memory
Analysis runs out of memory
- Reduce analysis depth to
class - Exclude test projects
- Analyze in smaller batches
Visualization is laggy
Visualization is laggy
- Enable filters to reduce visible nodes
- Use isolation mode
- Reduce render quality in settings
- Use a machine with dedicated GPU
Layout takes too long
Layout takes too long
- Ensure GPU server is running
- Reduce iterations for initial layout
- Increase
barnesHutThetafor approximation
Neo4j queries are slow
Neo4j queries are slow
- Check indexes are created
- Increase Neo4j memory
- Use parameterized queries
- Add specific indexes for your query patterns