{"action":"created","issue":{"url":"https://api.github.com/repos/briancavalier/creed/issues/9","repository_url":"https://api.github.com/repos/briancavalier/creed","labels_url":"https://api.github.com/repos/briancavalier/creed/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/briancavalier/creed/issues/9/comments","events_url":"https://api.github.com/repos/briancavalier/creed/issues/9/events","html_url":"https://github.com/briancavalier/creed/pull/9","id":161865434,"number":9,"title":"WIP: Handles","user":{"login":"bergus","id":1146478,"avatar_url":"https://avatars.githubusercontent.com/u/1146478?v=3","gravatar_id":"","url":"https://api.github.com/users/bergus","html_url":"https://github.com/bergus","followers_url":"https://api.github.com/users/bergus/followers","following_url":"https://api.github.com/users/bergus/following{/other_user}","gists_url":"https://api.github.com/users/bergus/gists{/gist_id}","starred_url":"https://api.github.com/users/bergus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bergus/subscriptions","organizations_url":"https://api.github.com/users/bergus/orgs","repos_url":"https://api.github.com/users/bergus/repos","events_url":"https://api.github.com/users/bergus/events{/privacy}","received_events_url":"https://api.github.com/users/bergus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-06-23T08:19:28Z","updated_at":"2016-06-24T00:13:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/briancavalier/creed/pulls/9","html_url":"https://github.com/briancavalier/creed/pull/9","diff_url":"https://github.com/briancavalier/creed/pull/9.diff","patch_url":"https://github.com/briancavalier/creed/pull/9.patch"},"body":"Hi,\r\nyou might want to have a look at this approach for keeping as few references as possibles around. The `near` approach in general is nice, but requires to actually install handlers on the promise. If the promise with a deep `become` chain is only kept around, this doesn't work.\r\nBest thing: I even wrote tests for this :-) The current master branch fails them.\r\n\r\nI don't actually want you to merge this - it's a quite radical redesign - only discuss it as a proof-of-concept."},"comment":{"url":"https://api.github.com/repos/briancavalier/creed/issues/comments/228222700","html_url":"https://github.com/briancavalier/creed/pull/9#issuecomment-228222700","issue_url":"https://api.github.com/repos/briancavalier/creed/issues/9","id":228222700,"user":{"login":"briancavalier","id":90518,"avatar_url":"https://avatars.githubusercontent.com/u/90518?v=3","gravatar_id":"","url":"https://api.github.com/users/briancavalier","html_url":"https://github.com/briancavalier","followers_url":"https://api.github.com/users/briancavalier/followers","following_url":"https://api.github.com/users/briancavalier/following{/other_user}","gists_url":"https://api.github.com/users/briancavalier/gists{/gist_id}","starred_url":"https://api.github.com/users/briancavalier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briancavalier/subscriptions","organizations_url":"https://api.github.com/users/briancavalier/orgs","repos_url":"https://api.github.com/users/briancavalier/repos","events_url":"https://api.github.com/users/briancavalier/events{/privacy}","received_events_url":"https://api.github.com/users/briancavalier/received_events","type":"User","site_admin":false},"created_at":"2016-06-24T00:13:35Z","updated_at":"2016-06-24T00:13:35Z","body":"A few observations about the effect of this branch so far on performance.  Here are some representative results of the `doxbee` test (in perf/) from master:\r\n\r\n```\r\nresults for 10000 parallel executions, 1 ms per I/O op\r\n\r\nfile                                 time(ms)  memory(MB)\r\npromises-creed-generator.js               199       27.89\r\ncallbacks-baseline.js                     214       36.69\r\npromises-bluebird-generator.js            251       32.02\r\npromises-cujojs-when-generator.js         263       42.81\r\npromises-creed.js                         337       52.95\r\npromises-creed-algebraic.js               343       51.78\r\npromises-bluebird.js                      351       50.79\r\npromises-cujojs-when.js                   423       64.81\r\n```\r\n\r\nAnd from this branch:\r\n\r\n```\r\nresults for 10000 parallel executions, 1 ms per I/O op\r\n\r\nfile                                 time(ms)  memory(MB)\r\ncallbacks-baseline.js                     200       36.79\r\npromises-bluebird-generator.js            266       31.74\r\npromises-cujojs-when-generator.js         289       39.18\r\npromises-creed-algebraic.js               342       50.40\r\npromises-creed.js                         350       51.60\r\npromises-creed-generator.js               356       43.86\r\npromises-bluebird.js                      356       49.77\r\npromises-cujojs-when.js                   459       64.92\r\n```\r\n\r\nInterestingly, memory usage has gone down ever so slightly for the normal promise and algebraic tests.  They've taken a slight cpu hit.  However, coroutine/generator memory usage has gone up significantly as well as taking a significant cpu hit.\r\n\r\nSome of the conflation of objects (like Future having a `run()` method) was to reduce object allocations.  I'm guessing that there are more object allocations going on now.  I wonder if introducing inheritance into the actions has also had an effect.\r\n\r\nAnyway, I realize this PR isn't your ultimate goal, and cancellation is.  I just wanted to see what effect this new Handle architecture might have on memory usage in the tests.  If creed can be more GC friendly and still retain (approximately) the perf characteristics in master, that'd be a big win.\r\n\r\nMaybe once I understand the tests here a bit more, we can figure out what to do :)"}}
{"actor":{"display_login":"briancavalier"}}