{"action":"created","issue":{"url":"https://api.github.com/repos/jenkinsci/jenkins/issues/2539","repository_url":"https://api.github.com/repos/jenkinsci/jenkins","labels_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/2539/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/2539/comments","events_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/2539/events","html_url":"https://github.com/jenkinsci/jenkins/pull/2539","id":175134826,"number":2539,"title":"[JENKINS-10912] Use setInterval in refreshPart","user":{"login":"lpancescu","id":1677965,"avatar_url":"https://avatars.githubusercontent.com/u/1677965?v=3","gravatar_id":"","url":"https://api.github.com/users/lpancescu","html_url":"https://github.com/lpancescu","followers_url":"https://api.github.com/users/lpancescu/followers","following_url":"https://api.github.com/users/lpancescu/following{/other_user}","gists_url":"https://api.github.com/users/lpancescu/gists{/gist_id}","starred_url":"https://api.github.com/users/lpancescu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lpancescu/subscriptions","organizations_url":"https://api.github.com/users/lpancescu/orgs","repos_url":"https://api.github.com/users/lpancescu/repos","events_url":"https://api.github.com/users/lpancescu/events{/privacy}","received_events_url":"https://api.github.com/users/lpancescu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jenkinsci/jenkins/labels/needs-review","name":"needs-review","color":"207de5"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-05T22:59:58Z","updated_at":"2016-09-06T08:45:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/2539","html_url":"https://github.com/jenkinsci/jenkins/pull/2539","diff_url":"https://github.com/jenkinsci/jenkins/pull/2539.diff","patch_url":"https://github.com/jenkinsci/jenkins/pull/2539.patch"},"body":"The current implementation of refreshPart creates a new closure every 5\r\nseconds, which, in combination with XMLHttpRequest objects, results in a\r\nsignificant memory leak in all major browsers. By using\r\nwindow.setInterval to schedule periodic refreshes, only one closure per\r\nid is created. Please see [issue 10912](https://issues.jenkins-ci.org/browse/JENKINS-34923) in the Jenkins tracker for\r\nfurther details.\r\n\r\nhttps://issues.jenkins-ci.org/browse/JENKINS-10912"},"comment":{"url":"https://api.github.com/repos/jenkinsci/jenkins/issues/comments/244887883","html_url":"https://github.com/jenkinsci/jenkins/pull/2539#issuecomment-244887883","issue_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/2539","id":244887883,"user":{"login":"lpancescu","id":1677965,"avatar_url":"https://avatars.githubusercontent.com/u/1677965?v=3","gravatar_id":"","url":"https://api.github.com/users/lpancescu","html_url":"https://github.com/lpancescu","followers_url":"https://api.github.com/users/lpancescu/followers","following_url":"https://api.github.com/users/lpancescu/following{/other_user}","gists_url":"https://api.github.com/users/lpancescu/gists{/gist_id}","starred_url":"https://api.github.com/users/lpancescu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lpancescu/subscriptions","organizations_url":"https://api.github.com/users/lpancescu/orgs","repos_url":"https://api.github.com/users/lpancescu/repos","events_url":"https://api.github.com/users/lpancescu/events{/privacy}","received_events_url":"https://api.github.com/users/lpancescu/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T08:45:57Z","updated_at":"2016-09-06T08:45:57Z","body":"While trying to make sure that there are no other memory leaks on the dashboard page, I removed the `#buildQueue` and `#executors` `div`s from the Dashboard page, using the browser's Inspect tool. This stops the updates, but the same log message will be issued every 5 seconds, causing the browser to slowly increase its memory footprint to keep all log messages. We could prevent that by calling `window.clearInterval` immediately after `console.log`. Should I update my PR to do that?"}}
{"actor":{"display_login":"lpancescu"}}