aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-09-03 18:11:07 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-09-03 18:11:07 +0200
commit543da3e0b7592b1a00a7c5baec1554460609d63f (patch)
treeb7e3ad3bbd69ff99e2d051a4381e2854706fad57 /src/Wallabag/CoreBundle/Controller
parent8f8654913ce82be12219a37a24630066bbe950c2 (diff)
downloadwallabag-543da3e0b7592b1a00a7c5baec1554460609d63f.tar.gz
wallabag-543da3e0b7592b1a00a7c5baec1554460609d63f.tar.zst
wallabag-543da3e0b7592b1a00a7c5baec1554460609d63f.zip
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)
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller')
-rw-r--r--src/Wallabag/CoreBundle/Controller/DeveloperController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/DeveloperController.php b/src/Wallabag/CoreBundle/Controller/DeveloperController.php
index 1ea220e5..63386db0 100644
--- a/src/Wallabag/CoreBundle/Controller/DeveloperController.php
+++ b/src/Wallabag/CoreBundle/Controller/DeveloperController.php
@@ -49,7 +49,7 @@ class DeveloperController extends Controller
49 49
50 $this->get('session')->getFlashBag()->add( 50 $this->get('session')->getFlashBag()->add(
51 'notice', 51 'notice',
52 $this->get('translator')->trans('flashes.developer.notice.client_created', array('%name%' => $client->getName())) 52 $this->get('translator')->trans('flashes.developer.notice.client_created', ['%name%' => $client->getName()])
53 ); 53 );
54 54
55 return $this->render('WallabagCoreBundle:Developer:client_parameters.html.twig', [ 55 return $this->render('WallabagCoreBundle:Developer:client_parameters.html.twig', [
@@ -81,7 +81,7 @@ class DeveloperController extends Controller
81 81
82 $this->get('session')->getFlashBag()->add( 82 $this->get('session')->getFlashBag()->add(
83 'notice', 83 'notice',
84 $this->get('translator')->trans('flashes.developer.notice.client_deleted', array('%name%' => $client->getName())) 84 $this->get('translator')->trans('flashes.developer.notice.client_deleted', ['%name%' => $client->getName()])
85 ); 85 );
86 86
87 return $this->redirect($this->generateUrl('developer')); 87 return $this->redirect($this->generateUrl('developer'));