Replace $this->render(...) with return new
\Symfony\Component\HttpFoundation\Response('XXX'); and give us feedback.
On Saturday, 28 July 2012 16:43:19 UTC+2, Alex Tabaksmann wrote:
>
> Hi,
>
> im running into serious Twig performance issues and I cant figure out why.
>
> Controller Code:
> /**
> * Renders top header
> *
> * @Route("/esi/get_navbar", name="frontend_header")
> */
> public function getNavbarAction()
> {
> $response =
> $this->render('VirtualNightsFrontendBaseBundle:Header:navbar.html.twig',
> array());
> $response->setSharedMaxAge(0);
>
> return $response;
> }
>
> The twig templates contains only "XXX"
> Symfony is running on a root Server with 24 cores. Its a really fast thing
> there.
>
> Now when i run a benchmark on this Url i get:
>
> ab -kc 10 -t 30 http://localhost/app.php/esi/get_navbar
> Requests per second: 6.73 [#/sec] (mean)
>
> In browser the loadtime of the script is around 250ms.
>
> How can it be? I mean 7 req/sec and 250ms only for a simple string output
> is very slow. Am i doing something wrong?
>
> Thank you!
>
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en