{"action":"created","issue":{"url":"https://api.github.com/repos/MoOx/phenomic/issues/547","repository_url":"https://api.github.com/repos/MoOx/phenomic","labels_url":"https://api.github.com/repos/MoOx/phenomic/issues/547/labels{/name}","comments_url":"https://api.github.com/repos/MoOx/phenomic/issues/547/comments","events_url":"https://api.github.com/repos/MoOx/phenomic/issues/547/events","html_url":"https://github.com/MoOx/phenomic/issues/547","id":163590050,"number":547,"title":"Avoiding duplicate content data for performance","user":{"login":"jlevy","id":2058167,"avatar_url":"https://avatars.githubusercontent.com/u/2058167?v=3","gravatar_id":"","url":"https://api.github.com/users/jlevy","html_url":"https://github.com/jlevy","followers_url":"https://api.github.com/users/jlevy/followers","following_url":"https://api.github.com/users/jlevy/following{/other_user}","gists_url":"https://api.github.com/users/jlevy/gists{/gist_id}","starred_url":"https://api.github.com/users/jlevy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlevy/subscriptions","organizations_url":"https://api.github.com/users/jlevy/orgs","repos_url":"https://api.github.com/users/jlevy/repos","events_url":"https://api.github.com/users/jlevy/events{/privacy}","received_events_url":"https://api.github.com/users/jlevy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MoOx/phenomic/labels/type:%20documentation","name":"type: documentation","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-07-04T01:35:06Z","updated_at":"2016-07-11T07:27:38Z","closed_at":null,"body":"Forgive me if this has been discussed — I'm new to phenomic (which looks pretty cool!) and to using React for static content. \r\n\r\nDo folks have thoughts or suggestions on how to avoid sending the document content twice, i.e. once for the statically rendered HTML and once for the React .json? For small pages this doesn't matter, but for larger documents, it has a significant effect on download sizes. Yes, compression helps, but overall this consideration still seems to put frameworks like this at a disadvantage compared to simpler non-React static documentation sites, if you want to scale to larger docs, say 100KB+. \r\n\r\nShouldn't it be possible to rebuild the store from the DOM, if it's all there? (Incrementally filling it in might be another option, but as with most \"static\" sites, you also want the page fully browsable without JS and indexed by search engines.) All I've seen on this is a bit of older discussion here: https://news.ycombinator.com/item?id=10009570"},"comment":{"url":"https://api.github.com/repos/MoOx/phenomic/issues/comments/231660556","html_url":"https://github.com/MoOx/phenomic/issues/547#issuecomment-231660556","issue_url":"https://api.github.com/repos/MoOx/phenomic/issues/547","id":231660556,"user":{"login":"jlevy","id":2058167,"avatar_url":"https://avatars.githubusercontent.com/u/2058167?v=3","gravatar_id":"","url":"https://api.github.com/users/jlevy","html_url":"https://github.com/jlevy","followers_url":"https://api.github.com/users/jlevy/followers","following_url":"https://api.github.com/users/jlevy/following{/other_user}","gists_url":"https://api.github.com/users/jlevy/gists{/gist_id}","starred_url":"https://api.github.com/users/jlevy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlevy/subscriptions","organizations_url":"https://api.github.com/users/jlevy/orgs","repos_url":"https://api.github.com/users/jlevy/repos","events_url":"https://api.github.com/users/jlevy/events{/privacy}","received_events_url":"https://api.github.com/users/jlevy/received_events","type":"User","site_admin":false},"created_at":"2016-07-11T07:27:38Z","updated_at":"2016-07-11T07:27:38Z","body":"Thanks for the detailed response. Re 1, yes, and this is why I'm looking at Phenomic too. :)\r\n\r\nRe 3: Yes, understood. Regarding compression, yes of course it helps, but I don't think it's accurate to assume gzip eliminates the cost (since for large pages the duplicate strings are far apart and the symbol buffers are [pretty small](http://stackoverflow.com/questions/37176508/how-does-deflatezlib-determine-block-size) by default). Just for fun, here's an example manually removing the duplicated portions on Phenomic-generated output:\r\n```\r\n  968K  index.html.full           323K  index.html.full.gz\r\n  518K  index.html.noraw          167K  index.html.noraw.gz\r\n  260K  index.html.noraw_nojs      85K  index.html.noraw_nojs.gz\r\n```\r\n(Admittedly server or CDN compression settings may vary.)\r\n\r\nAnyway, the part that's unclear to me (since I'm not that experienced with React) is, surely there is a way to hack the loading process and reconstruct the state directly from the HTML without any fetch? I realize this is not standard practice but the data is right there. It'd be cool to see Phenomic have similar weight to non-React static website generators."}}
{"actor":{"display_login":"jlevy"}}