{"action":"created","issue":{"url":"https://api.github.com/repos/niklasvh/html2canvas/issues/492","labels_url":"https://api.github.com/repos/niklasvh/html2canvas/issues/492/labels{/name}","comments_url":"https://api.github.com/repos/niklasvh/html2canvas/issues/492/comments","events_url":"https://api.github.com/repos/niklasvh/html2canvas/issues/492/events","html_url":"https://github.com/niklasvh/html2canvas/issues/492","id":52720365,"number":492,"title":"iFrame-less option, and other speed improvements","user":{"login":"mudcube","id":101564,"avatar_url":"https://avatars.githubusercontent.com/u/101564?v=3","gravatar_id":"","url":"https://api.github.com/users/mudcube","html_url":"https://github.com/mudcube","followers_url":"https://api.github.com/users/mudcube/followers","following_url":"https://api.github.com/users/mudcube/following{/other_user}","gists_url":"https://api.github.com/users/mudcube/gists{/gist_id}","starred_url":"https://api.github.com/users/mudcube/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mudcube/subscriptions","organizations_url":"https://api.github.com/users/mudcube/orgs","repos_url":"https://api.github.com/users/mudcube/repos","events_url":"https://api.github.com/users/mudcube/events{/privacy}","received_events_url":"https://api.github.com/users/mudcube/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/niklasvh/html2canvas/labels/Feature","name":"Feature","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2014-12-23T07:37:29Z","updated_at":"2015-03-05T15:00:07Z","closed_at":null,"body":"I'm working towards getting the speed of a basic renderer down, currently the most basic rendering takes over 100ms on my computer. iFrame generation takes 60ms on it's own for me. I bypassed the createWindowClone and rendering still works the same—it looks like the iFrame is for Chrome and \"background-images\", is that the only reason? Would you be interested in an option to turn iFrame rendering off, e.g. option.useIFrame = false (true by default)\r\n\r\nAnother thing I'm noticing is there are a lot of objects being created on each render that don't need to be recreated (could be cached). Some of the easiest to cache would be Support, ImageLoader, much of the code inside of Font() could be setup once and cached, and a bunch of other little things like that. What do you think about a way to create a reference to html2canvas that persists: \r\n\r\nvar context = new html2canvas();\r\ncontext.render(document.body).then(function(canvas){ });"},"comment":{"url":"https://api.github.com/repos/niklasvh/html2canvas/issues/comments/77378268","html_url":"https://github.com/niklasvh/html2canvas/issues/492#issuecomment-77378268","issue_url":"https://api.github.com/repos/niklasvh/html2canvas/issues/492","id":77378268,"user":{"login":"Bigous","id":6886560,"avatar_url":"https://avatars.githubusercontent.com/u/6886560?v=3","gravatar_id":"","url":"https://api.github.com/users/Bigous","html_url":"https://github.com/Bigous","followers_url":"https://api.github.com/users/Bigous/followers","following_url":"https://api.github.com/users/Bigous/following{/other_user}","gists_url":"https://api.github.com/users/Bigous/gists{/gist_id}","starred_url":"https://api.github.com/users/Bigous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bigous/subscriptions","organizations_url":"https://api.github.com/users/Bigous/orgs","repos_url":"https://api.github.com/users/Bigous/repos","events_url":"https://api.github.com/users/Bigous/events{/privacy}","received_events_url":"https://api.github.com/users/Bigous/received_events","type":"User","site_admin":false},"created_at":"2015-03-05T15:00:07Z","updated_at":"2015-03-05T15:00:07Z","body":"Same to me using 0.5-alpha2... 4-6 seconds each snap."}}