From a2abfc596965111c28ea43d9ab986732692e022f Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Tue, 28 Jun 2022 17:49:14 +0900 Subject: Write response as soon as data is ready Previously the entire archive had to be read before the template is executed, thus large archives takes forever to render from slow backing FS. --- templates/archive-foot.html | 2 ++ templates/archive-head.html | 12 ++++++++++++ templates/archive-page.html | 1 + templates/archive.html | 15 --------------- 4 files changed, 15 insertions(+), 15 deletions(-) create mode 100644 templates/archive-foot.html create mode 100644 templates/archive-head.html create mode 100644 templates/archive-page.html delete mode 100644 templates/archive.html (limited to 'templates') diff --git a/templates/archive-foot.html b/templates/archive-foot.html new file mode 100644 index 0000000..1e370b9 --- /dev/null +++ b/templates/archive-foot.html @@ -0,0 +1,2 @@ + +{{template "base-foot.html" -}} diff --git a/templates/archive-head.html b/templates/archive-head.html new file mode 100644 index 0000000..ed643e3 --- /dev/null +++ b/templates/archive-head.html @@ -0,0 +1,12 @@ +{{template "base-head.html" -}} + +{{.Title}} + + +
diff --git a/templates/archive-page.html b/templates/archive-page.html new file mode 100644 index 0000000..8011ece --- /dev/null +++ b/templates/archive-page.html @@ -0,0 +1 @@ + {{.Name}} diff --git a/templates/archive.html b/templates/archive.html deleted file mode 100644 index 619a5bc..0000000 --- a/templates/archive.html +++ /dev/null @@ -1,15 +0,0 @@ -{{template "base-head.html" -}} - -{{.Title}} - - -
{{range .Entries}} - {{.Name}}{{end}} -
-{{template "base-foot.html" -}} -- cgit 1.4.1