{"action":"created","issue":{"url":"https://api.github.com/repos/ContinuumIO/dask/issues/18","labels_url":"https://api.github.com/repos/ContinuumIO/dask/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/ContinuumIO/dask/issues/18/comments","events_url":"https://api.github.com/repos/ContinuumIO/dask/issues/18/events","html_url":"https://github.com/ContinuumIO/dask/issues/18","id":56113481,"number":18,"title":"Task Fusion","user":{"login":"mrocklin","id":306380,"avatar_url":"https://avatars.githubusercontent.com/u/306380?v=3","gravatar_id":"","url":"https://api.github.com/users/mrocklin","html_url":"https://github.com/mrocklin","followers_url":"https://api.github.com/users/mrocklin/followers","following_url":"https://api.github.com/users/mrocklin/following{/other_user}","gists_url":"https://api.github.com/users/mrocklin/gists{/gist_id}","starred_url":"https://api.github.com/users/mrocklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrocklin/subscriptions","organizations_url":"https://api.github.com/users/mrocklin/orgs","repos_url":"https://api.github.com/users/mrocklin/repos","events_url":"https://api.github.com/users/mrocklin/events{/privacy}","received_events_url":"https://api.github.com/users/mrocklin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-01-31T05:29:16Z","updated_at":"2015-01-31T19:53:23Z","closed_at":null,"body":"We want an optimization pass that fuses linear sequences of tasks.  Note the disappearance of 'w' and 'y'\r\n\r\n```Python\r\n>>> d = {'v': (inc, 'y'),\r\n...      'u': (inc, 'w'),\r\n...      'w': (inc, 'x'), \r\n...      'x': (inc, 'y'), \r\n...      'y': (inc, 'z'), \r\n...      'z': (add, 'a', 'b'), \r\n...      'a': (inc, 'c'), 'b': (inc, 'd'),\r\n...      'c': 1, 'd': 2}\r\n>>> fuse(d)\r\n{'u': (inc, (inc, 'x')),\r\n 'x': (inc, 'y'),\r\n 'v': (inc, 'y'),\r\n 'y': ((inc, (add, 'a', 'b'))), \r\n 'a': (inc, 'c'), 'b': (inc, 'd'),\r\n 'c': 1, 'd': 2}\r\n```\r\n\r\nWe only want to do this when the task has one real dependency.  We don't want to destroy potential parallelism.\r\n\r\n@eriknw this seems up your alley.  From my perspective this just became relatively high priority.  I might take a crack in the next few days so do let me know if you take it on."},"comment":{"url":"https://api.github.com/repos/ContinuumIO/dask/issues/comments/72333316","html_url":"https://github.com/ContinuumIO/dask/issues/18#issuecomment-72333316","issue_url":"https://api.github.com/repos/ContinuumIO/dask/issues/18","id":72333316,"user":{"login":"mrocklin","id":306380,"avatar_url":"https://avatars.githubusercontent.com/u/306380?v=3","gravatar_id":"","url":"https://api.github.com/users/mrocklin","html_url":"https://github.com/mrocklin","followers_url":"https://api.github.com/users/mrocklin/followers","following_url":"https://api.github.com/users/mrocklin/following{/other_user}","gists_url":"https://api.github.com/users/mrocklin/gists{/gist_id}","starred_url":"https://api.github.com/users/mrocklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrocklin/subscriptions","organizations_url":"https://api.github.com/users/mrocklin/orgs","repos_url":"https://api.github.com/users/mrocklin/repos","events_url":"https://api.github.com/users/mrocklin/events{/privacy}","received_events_url":"https://api.github.com/users/mrocklin/received_events","type":"User","site_admin":false},"created_at":"2015-01-31T19:53:23Z","updated_at":"2015-01-31T19:53:23Z","body":"The pattern we want to destroy is a long vertical chain.  Everything else we probably want to keep."}}