From ffb29ddaf1ad309645a0c49ee8b6fd936f44fe57 Mon Sep 17 00:00:00 2001 From: Sampriti Panda Date: Mon, 23 Jul 2018 23:15:36 +0530 Subject: [PATCH] subs: Replace tr block with t in subs handlebars template. The `tr` block does clones the `options` array (which contains the entire subscriptions data set) very inefficiently, which leads to the rendering being very slow. We don't need a `tr` block here, as there is no dynamic content that needs to be replaced. --- static/templates/stream_creation_form.handlebars | 4 +--- static/templates/stream_types.handlebars | 14 ++++---------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/static/templates/stream_creation_form.handlebars b/static/templates/stream_creation_form.handlebars index 106755e026..07844db965 100644 --- a/static/templates/stream_creation_form.handlebars +++ b/static/templates/stream_creation_form.handlebars @@ -24,9 +24,7 @@ {{t "Stream permissions" }}
- {{#tr this}} - These settings are explained in detail in the help center. - {{/tr}} + {{t 'These settings are explained in detail in the help center.'}}
{{ partial "stream_types" "is_public" true }} diff --git a/static/templates/stream_types.handlebars b/static/templates/stream_types.handlebars index 5227263f60..788c12f327 100644 --- a/static/templates/stream_types.handlebars +++ b/static/templates/stream_types.handlebars @@ -2,32 +2,26 @@