{"action":"opened","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/18808","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/18808/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/18808/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/18808/events","html_url":"https://github.com/symfony/symfony/issues/18808","id":155572315,"number":18808,"title":"Profiler timeline looks confusing in some cases","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/symfony/symfony/labels/Bug","name":"Bug","color":"e10c02"},{"url":"https://api.github.com/repos/symfony/symfony/labels/Status:%20Needs%20Review","name":"Status: Needs Review","color":"ededed"},{"url":"https://api.github.com/repos/symfony/symfony/labels/WebProfilerBundle","name":"WebProfilerBundle","color":"DDDDDD"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-18T18:38:12Z","updated_at":"2016-05-18T18:38:12Z","closed_at":null,"body":"I was trying to optimize a Symfony 3 application when I saw that `kernel.terminate` was taking 93ms (~33% of total time). This is strange because I don't have any custom listener for that event. To make things worse, the profiler timeline displays this:\r\n\r\n![profiler_timeline](https://cloud.githubusercontent.com/assets/73419/15370506/a92437aa-1d37-11e6-8df9-7c8aed28053d.png)\r\n\r\nSo, the email listener takes 2ms and then \"nothing\" executes for 91ms 😱 \r\n\r\n---\r\n\r\nThe truth is that the `ProfilerListener` hooks into `KernelEvents::TERMINATE`. So the real problem is that the profiler timeline is wrong. It should look like this:\r\n\r\n![profiler_timeline_annotated](https://cloud.githubusercontent.com/assets/73419/15370657/330d49e8-1d38-11e6-85fe-e23f04f5da6c.png)\r\n\r\n---\r\n\r\nI'll try to fix this, but I'd like to ask if others are experiencing weird issues with the timeline. Thanks!"}}