liquid icon indicating copy to clipboard operation
liquid copied to clipboard

Add to SlinSlo go template benchmark suite

Open mvrhov opened this issue 7 years ago • 2 comments

Checklist

Detailed Description

  • Add benchmark to the list of other template benchmarks.
  • Provide the bechnhmark results in readme until this is re-run by the author of original bench suite.

mvrhov avatar Jun 06 '18 06:06 mvrhov

This issue can be addressed by creating a PR against SlinSo/goTemplateBenchmark:

  • Add this package to glide.yaml
  • Create a liquid folder;
  • Translate at least the simple.* template from one of the other directories to liquid/simple.liquid.
  • Adding a function templates_test.go and templates_complex_test.go

This (osteele/liquid) package doesn't have a “precompile to go” option. The closest match is to precompile the template, and then run the compiled template. That performance is barely different from applying an uncompiled template — because most of the render time is in emulating Ruby semantics — so it probably doesn't make sense to add timings to the “precompilation to Go code” sections of SlinSo/goTemplateBenchmark's README.

osteele avatar Jun 10 '18 20:06 osteele

I've created a related issue #32, to add benchmarks to this (osteele/liquid) repository. This can be done independently of creating a PR to add timings to SlinSo/goTemplateBenchmark, except that the work of translating the test files from that repo into Liquid could be used for both this issue and that one.

osteele avatar Jun 10 '18 21:06 osteele