Count items in database as much as possible (#344)

* Count items in database as much as possible

* Fix the tests

* Remove two useless queries

* Run pragma directive before each sqlite connection

* Pragma for tests too

* Remove debug messages
This commit is contained in:
Baptiste Gelez
2018-12-14 23:16:18 +01:00
committed by GitHub
parent b0089e59b7
commit 38302203f4
19 changed files with 109 additions and 60 deletions
+2 -2
View File
@@ -37,8 +37,8 @@ pub fn index(conn: DbConn, user: Option<User>, intl: I18n) -> Ructe {
render!(instance::index(
&(&*conn, &intl.catalog, user),
inst,
User::count_local(&*conn) as i32,
Post::count_local(&*conn) as i32,
User::count_local(&*conn),
Post::count_local(&*conn),
local,
federated,
user_feed