Improve performance for library and title pages

This commit is contained in:
Alex Ling
2020-06-24 16:29:34 +00:00
parent 9d76ca8c24
commit c87b96dd0b
2 changed files with 24 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ class MainRouter < Router
begin
title = (@context.library.get_title env.params.url["title"]).not_nil!
username = get_username env
percentage = title.entries.map &.load_percentage username
percentage = title.load_percentage_for_all_entries username
title_percentage = title.titles.map &.load_percentage username
layout "title"
rescue e