{"action":"created","issue":{"url":"https://api.github.com/repos/andreasgal/j2me.js/issues/848","labels_url":"https://api.github.com/repos/andreasgal/j2me.js/issues/848/labels{/name}","comments_url":"https://api.github.com/repos/andreasgal/j2me.js/issues/848/comments","events_url":"https://api.github.com/repos/andreasgal/j2me.js/issues/848/events","html_url":"https://github.com/andreasgal/j2me.js/pull/848","id":54140103,"number":848,"title":"cache node modules and SlimerJS/XULRunner packages (fixes #847)","user":{"login":"mykmelez","id":305455,"avatar_url":"https://avatars.githubusercontent.com/u/305455?v=3","gravatar_id":"","url":"https://api.github.com/users/mykmelez","html_url":"https://github.com/mykmelez","followers_url":"https://api.github.com/users/mykmelez/followers","following_url":"https://api.github.com/users/mykmelez/following{/other_user}","gists_url":"https://api.github.com/users/mykmelez/gists{/gist_id}","starred_url":"https://api.github.com/users/mykmelez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mykmelez/subscriptions","organizations_url":"https://api.github.com/users/mykmelez/orgs","repos_url":"https://api.github.com/users/mykmelez/repos","events_url":"https://api.github.com/users/mykmelez/events{/privacy}","received_events_url":"https://api.github.com/users/mykmelez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-13T01:41:01Z","updated_at":"2015-01-13T01:57:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/andreasgal/j2me.js/pulls/848","html_url":"https://github.com/andreasgal/j2me.js/pull/848","diff_url":"https://github.com/andreasgal/j2me.js/pull/848.diff","patch_url":"https://github.com/andreasgal/j2me.js/pull/848.patch"},"body":"Now that we're using Travis's container-based infrastructure, we can cache some dependencies. This change caches local node modules and the SlimerJS/XULRunner packages (both of which it now downloads to */tmp/j2me.js/*, since Travis can only cache arbitrary directories, not arbitrary individual files).\r\n\r\n(We might also be able to cache the SlimerJS/XULRunner installations, but I'd have to think through that more carefully, since \"installation\" of those packages is currently just unzip/tar, which might not update the installations correctly when the packages get updated.)\r\n\r\nHere's the first build with this change, where you can see the cache being created:\r\n\r\nhttps://travis-ci.org/mykmelez/j2me.js/builds/46804315\r\n\r\nAnd here's an empty change I pushed so you can see it being restored and used:\r\n\r\nhttps://travis-ci.org/mykmelez/j2me.js/builds/46804632\r\n\r\nStrangely, *casperjs* node module installation is still almost as expensive (6.76s to 5.25s), even though it should have been cached. *SlimerJS* is significantly cheaper (1.11s to 0.35s), although the lightweight edition is so small that the difference is negligible to overall build times. And *XULRunner* is much cheaper (7.60s to 0.34s), which is significant, since I've seen download times for that file as high as 25s.\r\n\r\nNevertheless, note that it took 6.41s to restore the cache, so it's only worth it for XULRunner:\r\n\r\n> $ export CASHER_DIR=$HOME/.casher\r\n> 0.10s $ Installing caching utilities\r\n> 0.96s attempting to download cache archive\r\n> found cache\r\n> 2.68s adding /home/travis/build/mykmelez/j2me.js/node_modules to cache\r\n> 2.67s adding /tmp/j2me.js to cache\r\n"},"comment":{"url":"https://api.github.com/repos/andreasgal/j2me.js/issues/comments/69683569","html_url":"https://github.com/andreasgal/j2me.js/pull/848#issuecomment-69683569","issue_url":"https://api.github.com/repos/andreasgal/j2me.js/issues/848","id":69683569,"user":{"login":"mykmelez","id":305455,"avatar_url":"https://avatars.githubusercontent.com/u/305455?v=3","gravatar_id":"","url":"https://api.github.com/users/mykmelez","html_url":"https://github.com/mykmelez","followers_url":"https://api.github.com/users/mykmelez/followers","following_url":"https://api.github.com/users/mykmelez/following{/other_user}","gists_url":"https://api.github.com/users/mykmelez/gists{/gist_id}","starred_url":"https://api.github.com/users/mykmelez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mykmelez/subscriptions","organizations_url":"https://api.github.com/users/mykmelez/orgs","repos_url":"https://api.github.com/users/mykmelez/repos","events_url":"https://api.github.com/users/mykmelez/events{/privacy}","received_events_url":"https://api.github.com/users/mykmelez/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T01:57:59Z","updated_at":"2015-01-13T01:57:59Z","body":"You can also compare the first build in this PR (which creates a new cache, even though Travis previously created a cache for my branch, because Travis uses the cache for the target branch in the case of a PR):\r\n\r\nhttps://travis-ci.org/andreasgal/j2me.js/builds/46805510\r\n\r\nWith the second build in this PR (which I triggered by pushing another empty commit):\r\n\r\nhttps://travis-ci.org/andreasgal/j2me.js/builds/46806047\r\n"}}