Skip to content

Improved Rendering Performance

Pre-release
Pre-release

Choose a tag to compare

@tanner0101 tanner0101 released this 25 Jun 17:46
27724d0
This patch was authored and released by @tdotclare.

This release substantially improves the rendering performance of Leaf on typical calls where the template is fully resolved and cached.

Performance Comparison

  • Linear test - 10 flat templates, 1 million render calls against them
  • Random test - 10 flat templates (layer 3), 20 templates referencing one of the flat templates (layer 2), 100 templates referencing two random layer 2 templates (layer 1). 1 million render calls against a random one of the 130 total templates.
  • Each test was run 50 times on an 4GHz i7 Retina iMac

Linear

Branch Min Avg Max Avg Baseline Avg CPU Time CPU Baseline
1.0.0rc-1.13 4.27s 4.72s 5.14s 44.83% 1m 14s 40.72%
1.0.0rc-1.12 10.4s 10.52s 11.4s 100% 3m 1s 100%

Random

Branch Min Avg Max Avg Baseline Avg CPU Time CPU Baseline
1.0.0rc-1.13 4.43s 4.82s 5.17s 49.9% 1m 18s 45.3%
1.0.0rc-1.12 9s 9.66s 10.61s 100% 2m 51s 100%

NOTE this is purely a pipeline measurement - the templates used are lightweight and require near-zero time to serialize