Overview
TeeGrid is highly optimized for performance, but there are several techniques to maximize speed, especially with large datasets or complex formatting.Rendering Engines
TeeGrid supports multiple rendering engines with different performance characteristics.GDI+ (Default)
GDI (Fastest)
Skia (RAD Studio 12+)
Performance Benchmark Demo
FromUnit_Test_Speed.pas:
Performance Optimization Techniques
1. Use GDI for Maximum Speed
2. Disable Anti-Aliasing
3. Minimize Custom Formatting
4. Reduce Row Spacing
5. Disable Automatic Row Heights
6. Use Virtual Mode with Default Width
7. Reduce Mouse Activity
8. Disable Grid Lines
9. Batch Updates
10. Database Performance
Large Dataset Strategies
Virtual Data for Millions of Rows
Database Paging
Lazy Loading
Benchmarking
Measure Rendering Performance
Measure Scrolling Performance
Performance Comparison
Typical rendering times for 20 columns x 100 rows:Actual performance depends on hardware, data complexity, and formatting.
Memory Optimization
Use Virtual Mode
Free Unused Resources
Avoid Memory Leaks
Best Practices Summary
- Choose the right renderer for your needs (GDI for speed, GDI+/Skia for quality)
- Disable anti-aliasing unless smooth text is critical
- Use fixed row heights when possible
- Minimize custom formatting for large datasets
- Specify default column width in virtual mode
- Use virtual rendering for very large datasets
- Batch updates to avoid multiple repaints
- Disable mouse move events if not needed
- Profile your application to find bottlenecks
- Test with realistic data volumes
When Performance Matters Most
- Datasets with 10,000+ rows
- Real-time data updates
- Embedded/mobile devices
- Remote desktop scenarios
- Older hardware
- Complex custom rendering
Next Steps
- Explore Virtual Mode for large datasets
- Learn about Database Grid optimization
- See Themes for appearance customization
