{"action":"created","issue":{"url":"https://api.github.com/repos/jazeee/jazeee-meteor-spiderable/issues/41","repository_url":"https://api.github.com/repos/jazeee/jazeee-meteor-spiderable","labels_url":"https://api.github.com/repos/jazeee/jazeee-meteor-spiderable/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/jazeee/jazeee-meteor-spiderable/issues/41/comments","events_url":"https://api.github.com/repos/jazeee/jazeee-meteor-spiderable/issues/41/events","html_url":"https://github.com/jazeee/jazeee-meteor-spiderable/issues/41","id":196143237,"number":41,"title":"Possible problems with Meteor.isReadyForSpiderable","user":{"login":"naho2081","id":10779070,"avatar_url":"https://avatars.githubusercontent.com/u/10779070?v=3","gravatar_id":"","url":"https://api.github.com/users/naho2081","html_url":"https://github.com/naho2081","followers_url":"https://api.github.com/users/naho2081/followers","following_url":"https://api.github.com/users/naho2081/following{/other_user}","gists_url":"https://api.github.com/users/naho2081/gists{/gist_id}","starred_url":"https://api.github.com/users/naho2081/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naho2081/subscriptions","organizations_url":"https://api.github.com/users/naho2081/orgs","repos_url":"https://api.github.com/users/naho2081/repos","events_url":"https://api.github.com/users/naho2081/events{/privacy}","received_events_url":"https://api.github.com/users/naho2081/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-16T20:05:14Z","updated_at":"2016-12-17T05:20:52Z","closed_at":null,"body":"I have a concern regarding `Meteor.isReadyForSpiderable` variable.\r\n\r\nIt seems to me that `phantom_script.js` that is placed by package settings under Meteor Assets (full path `\"#{Meteor.rootPath}/assets/packages/jazeee_spiderable-longer-timeout/lib/phantom_script.js\"` doesn't even have access to such variables as `Meteor`, `Package`.\r\nThat's why it can't \"read\" `Meteor.isReadyForSpiderable` variable.\r\n\r\nReasons why I think so:\r\n\r\n1. In our project routes that even don't have `Meteor.isReadyForSpiderable = true` setting at all are \"spidered\" correctly.\r\n\r\n2. Pages that are normally loaded in less than 300ms are \"spidered\" with ?_escaped_fragment_= longer than 4 seconds.\r\n\r\n3. If in `if(totalIterations > 200)` setting in the `phantom_script.js` change totalIterations value to 50 or 100, pages are spidered much more quickly, but in some cases spiderable returns page in \"loading\" state that tells us that not all subscriptions are ready. Again, even if corresponding route has `Meteor.isReadyForSpiderable = true` setting after `@ready`.\r\n\r\nSee attached screenshots with load time for the page with ?_escaped_fragment_= and without it.\r\n\r\nWho has seen similar behaviour or am I missing something?\r\n\r\nWaiting for server response with ?_escaped_fragment_= \r\n![image](https://cloud.githubusercontent.com/assets/10779070/21276650/1776fe50-c3db-11e6-9271-e28103742e81.png)\r\nTotal time WITH ?_escaped_fragment_= \r\n![image](https://cloud.githubusercontent.com/assets/10779070/21276747/81906182-c3db-11e6-967e-2007f08b9c92.png)\r\nTotal time WITHOUT ?_escaped_fragment_= \r\n![image](https://cloud.githubusercontent.com/assets/10779070/21276751/84417dee-c3db-11e6-994b-1271d0449dd1.png)\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jazeee/jazeee-meteor-spiderable/issues/comments/267744273","html_url":"https://github.com/jazeee/jazeee-meteor-spiderable/issues/41#issuecomment-267744273","issue_url":"https://api.github.com/repos/jazeee/jazeee-meteor-spiderable/issues/41","id":267744273,"user":{"login":"naho2081","id":10779070,"avatar_url":"https://avatars.githubusercontent.com/u/10779070?v=3","gravatar_id":"","url":"https://api.github.com/users/naho2081","html_url":"https://github.com/naho2081","followers_url":"https://api.github.com/users/naho2081/followers","following_url":"https://api.github.com/users/naho2081/following{/other_user}","gists_url":"https://api.github.com/users/naho2081/gists{/gist_id}","starred_url":"https://api.github.com/users/naho2081/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naho2081/subscriptions","organizations_url":"https://api.github.com/users/naho2081/orgs","repos_url":"https://api.github.com/users/naho2081/repos","events_url":"https://api.github.com/users/naho2081/events{/privacy}","received_events_url":"https://api.github.com/users/naho2081/received_events","type":"User","site_admin":false},"created_at":"2016-12-17T05:20:52Z","updated_at":"2016-12-17T05:20:52Z","body":"Hey @dr-dimitru ,\r\n\r\nthat is free Pingdom website speed tool available [here](https://tools.pingdom.com/).\r\nAnd it supports rendering of Meteor pages without ?escaped_fragment=.\r\n\r\nIn my example second screenshot shows total loading time for same page, but without ?escaped_fragment=. \r\n\r\nAdded here screenshot that shows how it loads. As you see, approximately after 500ms it starts downloading images. This means that till this time HTML is fully ready on the client side.\r\n\r\nPhantomJS is not so slow that it will render same page 4 seconds. With adjusted `setInterval` and `totalIterations` in `phantom_script.js` we achieved page rendering time by PhantomJS that is around 300 ms instead of almost 4s. \r\n\r\n![image](https://cloud.githubusercontent.com/assets/10779070/21284584/54077d2a-c428-11e6-8339-e96091ad0450.png)\r\n"}}
{"actor":{"display_login":"naho2081"}}