Skip to content

Performance

DataGlass optimizes rendering automatically and provides tools to monitor and diagnose performance issues.

Automatic Optimization

The rendering optimizer classifies datasets by size and applies the appropriate strategy:

Dataset SizeStrategyWhat Happens
Under 1,000Full renderAll features enabled, no optimization
1,000 - 10,000AggregateGroups nearby points, reduces visual complexity
10,000 - 50,000ProgressiveRenders in chunks, updates display incrementally
Over 50,000SampleUniform sampling to manageable size

For time series data, DataGlass uses LTTB (Largest Triangle Three Buckets) downsampling to preserve visual shape while reducing points.

You don't configure this—it happens automatically based on your data.

Caching

DataGlass caches at multiple levels:

Data Cache

Parsed data stays in memory. The second render of the same file skips parsing entirely.

Settings:

  • cacheEnabled - Toggle data caching (default: on)
  • cacheMaxSize - Maximum cached items (default: 100)
  • cacheTTL - Time to live in minutes (default: 30)

URL Cache

Remote data fetches cache responses to reduce network requests.

Settings:

  • urlCacheEnabled - Toggle URL caching (default: on)
  • urlCacheDuration - Cache duration in minutes (default: 15)

Parse Cache

YAML configurations cache after first parse. Identical configs render faster on repeat.

Performance Monitoring

Track rendering performance across your vault.

Quick Report

Command: Show Performance Report

Displays a notice with:

  • Total charts rendered
  • Average render time
  • Cache hit rate

Detailed Report

Command: Show Detailed Performance Report

Opens a modal with comprehensive metrics:

=== DataGlass Performance Report ===

Summary
-------
Total Renders: 47
Cache Hit Rate: 78%
Avg Render Time: 23ms

Phase Breakdown
---------------
Parse:     avg 2ms   (p95: 5ms)
Load:      avg 8ms   (p95: 45ms)
Transform: avg 3ms   (p95: 12ms)
Render:    avg 10ms  (p95: 28ms)

Data Sources
------------
file:   avg 5ms   (42 loads)
inline: avg 1ms   (18 loads)
url:    avg 89ms  (3 loads, cached: 2)

Slowest Operations
------------------
1. sankey-network.md:12    156ms
2. large-dataset.md:8      89ms
3. api-dashboard.md:24     67ms

Export Reports

  • Export Performance Report as JSON - Machine-readable format
  • Export Performance Report as Markdown - Paste into notes

Reset Metrics

Command: Reset Performance Metrics

Clears all collected data. Use after making optimizations to measure improvement.

Optimization Tips

1. Filter Early

Apply filters before other transformations to reduce data volume:

yaml
transformations:
  - type: filter
    configuration:
      where: { status: { eq: "active" } }
  - type: aggregate
    configuration:
      groupBy: [category]
      sum: [amount]

2. Select Only Needed Columns

Drop unused columns to reduce memory:

yaml
transformations:
  - type: select
    configuration:
      columns: [date, value, category]

3. Pre-aggregate Large Datasets

If your CSV has millions of rows, aggregate in the source file or use sampling:

yaml
transformations:
  - type: sampling
    configuration:
      method: random
      size: 10000

4. Use File Data Over URL

Local files load faster than network requests. Download frequently-used API data to your vault.

5. Simplify Complex Charts

Multiple marks, facets, and interactions add overhead. For dashboards with many charts, prefer simpler configurations.

Troubleshooting Slow Charts

  1. Run Detailed Performance Report - Identify which phase is slow
  2. Check data size - Large datasets trigger optimization automatically, but may still be slow
  3. Review transformations - Complex pipelines add overhead
  4. Verify cache is working - Check hit rate in performance report
  5. Test with inline data - Rules out file/URL loading issues

Common Issues

SymptomLikely CauseSolution
Slow first render, fast afterCold cacheExpected behavior
Always slowLarge dataset or complex transformsSimplify or sample data
Slow with URL dataNetwork latencyEnable caching, download locally
Memory warningsToo much cached dataReduce cacheMaxSize

Released under the MIT License. Built by Boundary Lab.