1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-22 17:18:37 +00:00

Instead of selecting the whole data, just count it

Instead of performing a complex select (to retrieve all data for entry, etc...) just select the counter and retrieve it.

Down from ~50ms to ~30ms on the unread page (with 500 items)
This commit is contained in:
Jeremy Benoist 2016-09-03 18:11:07 +02:00
parent 8f8654913c
commit 543da3e0b7
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
2 changed files with 13 additions and 13 deletions

View file

@ -49,7 +49,7 @@ class DeveloperController extends Controller
$this->get('session')->getFlashBag()->add(
'notice',
$this->get('translator')->trans('flashes.developer.notice.client_created', array('%name%' => $client->getName()))
$this->get('translator')->trans('flashes.developer.notice.client_created', ['%name%' => $client->getName()])
);
return $this->render('WallabagCoreBundle:Developer:client_parameters.html.twig', [
@ -81,7 +81,7 @@ class DeveloperController extends Controller
$this->get('session')->getFlashBag()->add(
'notice',
$this->get('translator')->trans('flashes.developer.notice.client_deleted', array('%name%' => $client->getName()))
$this->get('translator')->trans('flashes.developer.notice.client_deleted', ['%name%' => $client->getName()])
);
return $this->redirect($this->generateUrl('developer'));