{"action":"closed","number":206,"pull_request":{"url":"https://api.github.com/repos/getgrav/grav/pulls/206","id":38167743,"html_url":"https://github.com/getgrav/grav/pull/206","diff_url":"https://github.com/getgrav/grav/pull/206.diff","patch_url":"https://github.com/getgrav/grav/pull/206.patch","issue_url":"https://api.github.com/repos/getgrav/grav/issues/206","number":206,"state":"closed","locked":false,"title":"Add `onBuildPagesInitialized` event for memory & time consuming plugins","user":{"login":"Sommerregen","id":9073307,"avatar_url":"https://avatars.githubusercontent.com/u/9073307?v=3","gravatar_id":"","url":"https://api.github.com/users/Sommerregen","html_url":"https://github.com/Sommerregen","followers_url":"https://api.github.com/users/Sommerregen/followers","following_url":"https://api.github.com/users/Sommerregen/following{/other_user}","gists_url":"https://api.github.com/users/Sommerregen/gists{/gist_id}","starred_url":"https://api.github.com/users/Sommerregen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sommerregen/subscriptions","organizations_url":"https://api.github.com/users/Sommerregen/orgs","repos_url":"https://api.github.com/users/Sommerregen/repos","events_url":"https://api.github.com/users/Sommerregen/events{/privacy}","received_events_url":"https://api.github.com/users/Sommerregen/received_events","type":"User","site_admin":false},"body":"Hi @rhukster,\r\n\r\nregarding our yesterday's chat, I prefer to add a new event `onBuildPagesInitialized` into core, to allow memory and time consuming plugins to be initialized only when it is really needed (e.g. a page has changed and therefore `onPageContentRaw` or `onPageContentProcessed` is triggered). Thus, when there are no changes the plugin isn't even initalized! This makes Grav (in my opinion) very powerful, since otherwise all plugins (even the time consuming ones) have to be initialized in the `onPluginsInitialized` event.\r\n\r\nOk, caching could be speed up the process. But not everything could be chached, i.e. when one can register additional classes and imho it would be the best, if even the caching (load and process data) should only happen, when there is actually some uncached pages. This saves memory and Grav delivers sites faster.","created_at":"2015-06-20T12:59:10Z","updated_at":"2015-06-20T17:51:12Z","closed_at":"2015-06-20T17:51:12Z","merged_at":"2015-06-20T17:51:12Z","merge_commit_sha":"26f99edacad0f9910723197b6c1ea6b9eb6c9b78","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/getgrav/grav/pulls/206/commits","review_comments_url":"https://api.github.com/repos/getgrav/grav/pulls/206/comments","review_comment_url":"https://api.github.com/repos/getgrav/grav/pulls/comments{/number}","comments_url":"https://api.github.com/repos/getgrav/grav/issues/206/comments","statuses_url":"https://api.github.com/repos/getgrav/grav/statuses/0e35048143493f6f703fba1b20995be98672bc1a","head":{"label":"Sommerregen:feature/add-build-pages-event","ref":"feature/add-build-pages-event","sha":"0e35048143493f6f703fba1b20995be98672bc1a","user":{"login":"Sommerregen","id":9073307,"avatar_url":"https://avatars.githubusercontent.com/u/9073307?v=3","gravatar_id":"","url":"https://api.github.com/users/Sommerregen","html_url":"https://github.com/Sommerregen","followers_url":"https://api.github.com/users/Sommerregen/followers","following_url":"https://api.github.com/users/Sommerregen/following{/other_user}","gists_url":"https://api.github.com/users/Sommerregen/gists{/gist_id}","starred_url":"https://api.github.com/users/Sommerregen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sommerregen/subscriptions","organizations_url":"https://api.github.com/users/Sommerregen/orgs","repos_url":"https://api.github.com/users/Sommerregen/repos","events_url":"https://api.github.com/users/Sommerregen/events{/privacy}","received_events_url":"https://api.github.com/users/Sommerregen/received_events","type":"User","site_admin":false},"repo":{"id":30023768,"name":"grav","full_name":"Sommerregen/grav","owner":{"login":"Sommerregen","id":9073307,"avatar_url":"https://avatars.githubusercontent.com/u/9073307?v=3","gravatar_id":"","url":"https://api.github.com/users/Sommerregen","html_url":"https://github.com/Sommerregen","followers_url":"https://api.github.com/users/Sommerregen/followers","following_url":"https://api.github.com/users/Sommerregen/following{/other_user}","gists_url":"https://api.github.com/users/Sommerregen/gists{/gist_id}","starred_url":"https://api.github.com/users/Sommerregen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sommerregen/subscriptions","organizations_url":"https://api.github.com/users/Sommerregen/orgs","repos_url":"https://api.github.com/users/Sommerregen/repos","events_url":"https://api.github.com/users/Sommerregen/events{/privacy}","received_events_url":"https://api.github.com/users/Sommerregen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Sommerregen/grav","description":"Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS","fork":true,"url":"https://api.github.com/repos/Sommerregen/grav","forks_url":"https://api.github.com/repos/Sommerregen/grav/forks","keys_url":"https://api.github.com/repos/Sommerregen/grav/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sommerregen/grav/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sommerregen/grav/teams","hooks_url":"https://api.github.com/repos/Sommerregen/grav/hooks","issue_events_url":"https://api.github.com/repos/Sommerregen/grav/issues/events{/number}","events_url":"https://api.github.com/repos/Sommerregen/grav/events","assignees_url":"https://api.github.com/repos/Sommerregen/grav/assignees{/user}","branches_url":"https://api.github.com/repos/Sommerregen/grav/branches{/branch}","tags_url":"https://api.github.com/repos/Sommerregen/grav/tags","blobs_url":"https://api.github.com/repos/Sommerregen/grav/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sommerregen/grav/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sommerregen/grav/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sommerregen/grav/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sommerregen/grav/statuses/{sha}","languages_url":"https://api.github.com/repos/Sommerregen/grav/languages","stargazers_url":"https://api.github.com/repos/Sommerregen/grav/stargazers","contributors_url":"https://api.github.com/repos/Sommerregen/grav/contributors","subscribers_url":"https://api.github.com/repos/Sommerregen/grav/subscribers","subscription_url":"https://api.github.com/repos/Sommerregen/grav/subscription","commits_url":"https://api.github.com/repos/Sommerregen/grav/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sommerregen/grav/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sommerregen/grav/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sommerregen/grav/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sommerregen/grav/contents/{+path}","compare_url":"https://api.github.com/repos/Sommerregen/grav/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sommerregen/grav/merges","archive_url":"https://api.github.com/repos/Sommerregen/grav/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sommerregen/grav/downloads","issues_url":"https://api.github.com/repos/Sommerregen/grav/issues{/number}","pulls_url":"https://api.github.com/repos/Sommerregen/grav/pulls{/number}","milestones_url":"https://api.github.com/repos/Sommerregen/grav/milestones{/number}","notifications_url":"https://api.github.com/repos/Sommerregen/grav/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sommerregen/grav/labels{/name}","releases_url":"https://api.github.com/repos/Sommerregen/grav/releases{/id}","created_at":"2015-01-29T14:31:43Z","updated_at":"2015-05-05T19:33:21Z","pushed_at":"2015-06-20T16:30:56Z","git_url":"git://github.com/Sommerregen/grav.git","ssh_url":"git@github.com:Sommerregen/grav.git","clone_url":"https://github.com/Sommerregen/grav.git","svn_url":"https://github.com/Sommerregen/grav","homepage":"http://getgrav.org","size":3119,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"getgrav:develop","ref":"develop","sha":"c919ed36b429f71b2737f6002ccf72a8840f9a36","user":{"login":"getgrav","id":8237355,"avatar_url":"https://avatars.githubusercontent.com/u/8237355?v=3","gravatar_id":"","url":"https://api.github.com/users/getgrav","html_url":"https://github.com/getgrav","followers_url":"https://api.github.com/users/getgrav/followers","following_url":"https://api.github.com/users/getgrav/following{/other_user}","gists_url":"https://api.github.com/users/getgrav/gists{/gist_id}","starred_url":"https://api.github.com/users/getgrav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getgrav/subscriptions","organizations_url":"https://api.github.com/users/getgrav/orgs","repos_url":"https://api.github.com/users/getgrav/repos","events_url":"https://api.github.com/users/getgrav/events{/privacy}","received_events_url":"https://api.github.com/users/getgrav/received_events","type":"Organization","site_admin":false},"repo":{"id":22553797,"name":"grav","full_name":"getgrav/grav","owner":{"login":"getgrav","id":8237355,"avatar_url":"https://avatars.githubusercontent.com/u/8237355?v=3","gravatar_id":"","url":"https://api.github.com/users/getgrav","html_url":"https://github.com/getgrav","followers_url":"https://api.github.com/users/getgrav/followers","following_url":"https://api.github.com/users/getgrav/following{/other_user}","gists_url":"https://api.github.com/users/getgrav/gists{/gist_id}","starred_url":"https://api.github.com/users/getgrav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getgrav/subscriptions","organizations_url":"https://api.github.com/users/getgrav/orgs","repos_url":"https://api.github.com/users/getgrav/repos","events_url":"https://api.github.com/users/getgrav/events{/privacy}","received_events_url":"https://api.github.com/users/getgrav/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/getgrav/grav","description":"Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS","fork":false,"url":"https://api.github.com/repos/getgrav/grav","forks_url":"https://api.github.com/repos/getgrav/grav/forks","keys_url":"https://api.github.com/repos/getgrav/grav/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getgrav/grav/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getgrav/grav/teams","hooks_url":"https://api.github.com/repos/getgrav/grav/hooks","issue_events_url":"https://api.github.com/repos/getgrav/grav/issues/events{/number}","events_url":"https://api.github.com/repos/getgrav/grav/events","assignees_url":"https://api.github.com/repos/getgrav/grav/assignees{/user}","branches_url":"https://api.github.com/repos/getgrav/grav/branches{/branch}","tags_url":"https://api.github.com/repos/getgrav/grav/tags","blobs_url":"https://api.github.com/repos/getgrav/grav/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getgrav/grav/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getgrav/grav/git/refs{/sha}","trees_url":"https://api.github.com/repos/getgrav/grav/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getgrav/grav/statuses/{sha}","languages_url":"https://api.github.com/repos/getgrav/grav/languages","stargazers_url":"https://api.github.com/repos/getgrav/grav/stargazers","contributors_url":"https://api.github.com/repos/getgrav/grav/contributors","subscribers_url":"https://api.github.com/repos/getgrav/grav/subscribers","subscription_url":"https://api.github.com/repos/getgrav/grav/subscription","commits_url":"https://api.github.com/repos/getgrav/grav/commits{/sha}","git_commits_url":"https://api.github.com/repos/getgrav/grav/git/commits{/sha}","comments_url":"https://api.github.com/repos/getgrav/grav/comments{/number}","issue_comment_url":"https://api.github.com/repos/getgrav/grav/issues/comments{/number}","contents_url":"https://api.github.com/repos/getgrav/grav/contents/{+path}","compare_url":"https://api.github.com/repos/getgrav/grav/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getgrav/grav/merges","archive_url":"https://api.github.com/repos/getgrav/grav/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getgrav/grav/downloads","issues_url":"https://api.github.com/repos/getgrav/grav/issues{/number}","pulls_url":"https://api.github.com/repos/getgrav/grav/pulls{/number}","milestones_url":"https://api.github.com/repos/getgrav/grav/milestones{/number}","notifications_url":"https://api.github.com/repos/getgrav/grav/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getgrav/grav/labels{/name}","releases_url":"https://api.github.com/repos/getgrav/grav/releases{/id}","created_at":"2014-08-02T18:29:10Z","updated_at":"2015-06-18T15:48:05Z","pushed_at":"2015-06-20T17:51:12Z","git_url":"git://github.com/getgrav/grav.git","ssh_url":"git@github.com:getgrav/grav.git","clone_url":"https://github.com/getgrav/grav.git","svn_url":"https://github.com/getgrav/grav","homepage":"http://getgrav.org","size":6854,"stargazers_count":1209,"watchers_count":1209,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":101,"mirror_url":null,"open_issues_count":7,"forks":101,"open_issues":7,"watchers":1209,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/getgrav/grav/pulls/206"},"html":{"href":"https://github.com/getgrav/grav/pull/206"},"issue":{"href":"https://api.github.com/repos/getgrav/grav/issues/206"},"comments":{"href":"https://api.github.com/repos/getgrav/grav/issues/206/comments"},"review_comments":{"href":"https://api.github.com/repos/getgrav/grav/pulls/206/comments"},"review_comment":{"href":"https://api.github.com/repos/getgrav/grav/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/getgrav/grav/pulls/206/commits"},"statuses":{"href":"https://api.github.com/repos/getgrav/grav/statuses/0e35048143493f6f703fba1b20995be98672bc1a"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"rhukster","id":1084697,"avatar_url":"https://avatars.githubusercontent.com/u/1084697?v=3","gravatar_id":"","url":"https://api.github.com/users/rhukster","html_url":"https://github.com/rhukster","followers_url":"https://api.github.com/users/rhukster/followers","following_url":"https://api.github.com/users/rhukster/following{/other_user}","gists_url":"https://api.github.com/users/rhukster/gists{/gist_id}","starred_url":"https://api.github.com/users/rhukster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhukster/subscriptions","organizations_url":"https://api.github.com/users/rhukster/orgs","repos_url":"https://api.github.com/users/rhukster/repos","events_url":"https://api.github.com/users/rhukster/events{/privacy}","received_events_url":"https://api.github.com/users/rhukster/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":11,"deletions":0,"changed_files":1}}