{"action":"created","issue":{"url":"https://api.github.com/repos/wojtekmaj/react-pdf/issues/94","repository_url":"https://api.github.com/repos/wojtekmaj/react-pdf","labels_url":"https://api.github.com/repos/wojtekmaj/react-pdf/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/wojtekmaj/react-pdf/issues/94/comments","events_url":"https://api.github.com/repos/wojtekmaj/react-pdf/issues/94/events","html_url":"https://github.com/wojtekmaj/react-pdf/issues/94","id":268900855,"number":94,"title":"Performance issues when rendering large PDFs","user":{"login":"jesusgp22","id":2547899,"avatar_url":"https://avatars1.githubusercontent.com/u/2547899?v=4","gravatar_id":"","url":"https://api.github.com/users/jesusgp22","html_url":"https://github.com/jesusgp22","followers_url":"https://api.github.com/users/jesusgp22/followers","following_url":"https://api.github.com/users/jesusgp22/following{/other_user}","gists_url":"https://api.github.com/users/jesusgp22/gists{/gist_id}","starred_url":"https://api.github.com/users/jesusgp22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jesusgp22/subscriptions","organizations_url":"https://api.github.com/users/jesusgp22/orgs","repos_url":"https://api.github.com/users/jesusgp22/repos","events_url":"https://api.github.com/users/jesusgp22/events{/privacy}","received_events_url":"https://api.github.com/users/jesusgp22/received_events","type":"User","site_admin":false},"labels":[{"id":417567161,"url":"https://api.github.com/repos/wojtekmaj/react-pdf/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2017-10-26T20:30:08Z","updated_at":"2017-11-20T14:22:05Z","closed_at":null,"author_association":"NONE","body":"This might be a good question for pdf.js community itself but how does rendering large PDFs can be better handled with react-pdf?\r\n\r\npdf.js suggests not rendering more than 25 pages at a time:\r\nhttps://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#allthepages \r\n\r\nI even had to add this to my component to keep react from trying re-create the virtual DOM of the Document:\r\n\r\n```\r\n    shouldComponentUpdate(nextProps, nextState) {\r\n        if(nextProps.file !== this.props.file\r\n            || nextState.numPages !== this.state.numPages\r\n            || nextState.width !== this.state.width){\r\n            return true\r\n        }\r\n        return false\r\n    }\r\n```\r\n\r\nThe problem is that I also need to dynamically set the width of the document on user interacting so I can't save myself from re-creating the virtual DOM after width changes, any way I can achieve this with your lib?"},"comment":{"url":"https://api.github.com/repos/wojtekmaj/react-pdf/issues/comments/345709443","html_url":"https://github.com/wojtekmaj/react-pdf/issues/94#issuecomment-345709443","issue_url":"https://api.github.com/repos/wojtekmaj/react-pdf/issues/94","id":345709443,"user":{"login":"jesusgp22","id":2547899,"avatar_url":"https://avatars1.githubusercontent.com/u/2547899?v=4","gravatar_id":"","url":"https://api.github.com/users/jesusgp22","html_url":"https://github.com/jesusgp22","followers_url":"https://api.github.com/users/jesusgp22/followers","following_url":"https://api.github.com/users/jesusgp22/following{/other_user}","gists_url":"https://api.github.com/users/jesusgp22/gists{/gist_id}","starred_url":"https://api.github.com/users/jesusgp22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jesusgp22/subscriptions","organizations_url":"https://api.github.com/users/jesusgp22/orgs","repos_url":"https://api.github.com/users/jesusgp22/repos","events_url":"https://api.github.com/users/jesusgp22/events{/privacy}","received_events_url":"https://api.github.com/users/jesusgp22/received_events","type":"User","site_admin":false},"created_at":"2017-11-20T14:22:05Z","updated_at":"2017-11-20T14:22:05Z","author_association":"NONE","body":"@MarcoNicolodi yes, I think it can even be included as a PR to react-pdf at some point I don't have the time to share the code right now but I will later today. "}}
{"actor":{"display_login":"jesusgp22"}}