Skip to main content

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

From Unit_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

  1. Choose the right renderer for your needs (GDI for speed, GDI+/Skia for quality)
  2. Disable anti-aliasing unless smooth text is critical
  3. Use fixed row heights when possible
  4. Minimize custom formatting for large datasets
  5. Specify default column width in virtual mode
  6. Use virtual rendering for very large datasets
  7. Batch updates to avoid multiple repaints
  8. Disable mouse move events if not needed
  9. Profile your application to find bottlenecks
  10. 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