{"action":"created","issue":{"url":"https://api.github.com/repos/jekyll/jekyll/issues/3762","labels_url":"https://api.github.com/repos/jekyll/jekyll/issues/3762/labels{/name}","comments_url":"https://api.github.com/repos/jekyll/jekyll/issues/3762/comments","events_url":"https://api.github.com/repos/jekyll/jekyll/issues/3762/events","html_url":"https://github.com/jekyll/jekyll/pull/3762","id":85343340,"number":3762,"title":"Liquid profiler","user":{"login":"fw42","id":2072686,"avatar_url":"https://avatars.githubusercontent.com/u/2072686?v=3","gravatar_id":"","url":"https://api.github.com/users/fw42","html_url":"https://github.com/fw42","followers_url":"https://api.github.com/users/fw42/followers","following_url":"https://api.github.com/users/fw42/following{/other_user}","gists_url":"https://api.github.com/users/fw42/gists{/gist_id}","starred_url":"https://api.github.com/users/fw42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fw42/subscriptions","organizations_url":"https://api.github.com/users/fw42/orgs","repos_url":"https://api.github.com/users/fw42/repos","events_url":"https://api.github.com/users/fw42/events{/privacy}","received_events_url":"https://api.github.com/users/fw42/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jekyll/jekyll/labels/Pending%20Feedback","name":"Pending Feedback","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":23,"created_at":"2015-06-05T00:21:27Z","updated_at":"2015-06-08T16:36:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jekyll/jekyll/pulls/3762","html_url":"https://github.com/jekyll/jekyll/pull/3762","diff_url":"https://github.com/jekyll/jekyll/pull/3762.diff","patch_url":"https://github.com/jekyll/jekyll/pull/3762.patch"},"body":"This PR adds a `--profile` flag to Jekyll which generates a Liquid performance profile. I found this very helpful when trying to figure out why our site was so slow and which pages are the most worthwhile to optimize.\r\n\r\nThe output shows the number of times a certain file is being rendered and the total time it took to render that file (only the 50 worst offenders are shown).\r\n\r\nLooks like this on the Jekyll site:\r\n```\r\n$ bundle exec jekyll build -s site --profile\r\nConfiguration file: site/_config.yml\r\n            Source: site\r\n       Destination: /home/vagrant/src/jekyll/_site\r\n Incremental build: enabled\r\n      Generating...\r\n\r\n                           Filename | Count | Total time\r\n------------------------------------+-------+-----------\r\n                 _layouts/docs.html |    31 |      1.339\r\n_includes/docs_contents_mobile.html |    31 |      0.754\r\n         _includes/docs_option.html |   186 |      0.708\r\n       _includes/docs_contents.html |    31 |      0.518\r\n                 _layouts/news.html |    37 |      0.491\r\n             _includes/docs_ul.html |   186 |      0.480\r\n       _includes/news_contents.html |    37 |      0.265\r\n_includes/news_contents_mobile.html |    37 |      0.210\r\n                    _docs/assets.md |     1 |      0.146\r\n              _layouts/default.html |    70 |      0.135\r\n           _includes/news_item.html |    66 |      0.053\r\n                 _docs/datafiles.md |     1 |      0.051\r\n             _docs/configuration.md |     1 |      0.050\r\n              _includes/header.html |    70 |      0.049\r\n         _includes/section_nav.html |    31 |      0.047\r\n                   _docs/plugins.md |     1 |      0.038\r\n   _includes/primary-nav-items.html |   140 |      0.032\r\n                    news/index.html |     1 |      0.031\r\n           news/releases/index.html |     1 |      0.029\r\n    _docs/continuous-integration.md |     1 |      0.025\r\n                   _docs/history.md |     1 |      0.023\r\n                           feed.xml |     1 |      0.021\r\n               _docs/collections.md |     1 |      0.020\r\n                 _docs/templates.md |     1 |      0.019\r\n                     _docs/posts.md |     1 |      0.018\r\n\r\n                    done in 3.876 seconds.\r\n Auto-regeneration: disabled. Use --watch to enable.\r\n```\r\nDoesn't look very impressive on this small site that is already quite fast, but I found some nice improvements with this on our bigger site.\r\n\r\nThe code that pretty-prints the output is a little bit ugly. Suggestions welcome about how to improve it.\r\n\r\n@parkr @envygeeks @alfredxing, do you think this is something that could be useful for people?\r\n\r\n@csaunders FYI"},"comment":{"url":"https://api.github.com/repos/jekyll/jekyll/issues/comments/110068041","html_url":"https://github.com/jekyll/jekyll/pull/3762#issuecomment-110068041","issue_url":"https://api.github.com/repos/jekyll/jekyll/issues/3762","id":110068041,"user":{"login":"fw42","id":2072686,"avatar_url":"https://avatars.githubusercontent.com/u/2072686?v=3","gravatar_id":"","url":"https://api.github.com/users/fw42","html_url":"https://github.com/fw42","followers_url":"https://api.github.com/users/fw42/followers","following_url":"https://api.github.com/users/fw42/following{/other_user}","gists_url":"https://api.github.com/users/fw42/gists{/gist_id}","starred_url":"https://api.github.com/users/fw42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fw42/subscriptions","organizations_url":"https://api.github.com/users/fw42/orgs","repos_url":"https://api.github.com/users/fw42/repos","events_url":"https://api.github.com/users/fw42/events{/privacy}","received_events_url":"https://api.github.com/users/fw42/received_events","type":"User","site_admin":false},"created_at":"2015-06-08T16:36:45Z","updated_at":"2015-06-08T16:36:45Z","body":"I don't understand why \"#excerpt\" appears as the filename though unless it's overwriting the Post's path as well or something like that. Anyway, should I merge those two or keep them as separate ones?"}}