{"action":"created","issue":{"url":"https://api.github.com/repos/rupa/z/issues/191","repository_url":"https://api.github.com/repos/rupa/z","labels_url":"https://api.github.com/repos/rupa/z/issues/191/labels{/name}","comments_url":"https://api.github.com/repos/rupa/z/issues/191/comments","events_url":"https://api.github.com/repos/rupa/z/issues/191/events","html_url":"https://github.com/rupa/z/issues/191","id":164646805,"number":191,"title":"Update datafile in background for speed","user":{"login":"guoguo12","id":1940729,"avatar_url":"https://avatars.githubusercontent.com/u/1940729?v=3","gravatar_id":"","url":"https://api.github.com/users/guoguo12","html_url":"https://github.com/guoguo12","followers_url":"https://api.github.com/users/guoguo12/followers","following_url":"https://api.github.com/users/guoguo12/following{/other_user}","gists_url":"https://api.github.com/users/guoguo12/gists{/gist_id}","starred_url":"https://api.github.com/users/guoguo12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guoguo12/subscriptions","organizations_url":"https://api.github.com/users/guoguo12/orgs","repos_url":"https://api.github.com/users/guoguo12/repos","events_url":"https://api.github.com/users/guoguo12/events{/privacy}","received_events_url":"https://api.github.com/users/guoguo12/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-07-09T03:16:12Z","updated_at":"2016-07-13T05:38:48Z","closed_at":null,"body":"The default `$PROMPT_COMMAND` is\r\n```bash\r\n$ echo $PROMPT_COMMAND\r\n_z --add \"$(command pwd -P 2>/dev/null)\" 2>/dev/null\r\n```\r\nFor me (on Cygwin, Windows 8.1), the default configuration makes it so that if I hold down the Enter key in Bash, the prompts start to lag behind. Overall, the prompt feels slow.\r\n\r\nSo I changed it to\r\n```bash\r\n$ echo $PROMPT_COMMAND\r\n(_z --add \"$(command pwd -P 2>/dev/null)\" 2>/dev/null &)\r\n```\r\nThis seems to mostly fix the issue. The z datafile is updated in the background, silently.\r\n\r\n Is there any harm in doing this or reason why this isn't the default?"},"comment":{"url":"https://api.github.com/repos/rupa/z/issues/comments/232261244","html_url":"https://github.com/rupa/z/issues/191#issuecomment-232261244","issue_url":"https://api.github.com/repos/rupa/z/issues/191","id":232261244,"user":{"login":"guoguo12","id":1940729,"avatar_url":"https://avatars.githubusercontent.com/u/1940729?v=3","gravatar_id":"","url":"https://api.github.com/users/guoguo12","html_url":"https://github.com/guoguo12","followers_url":"https://api.github.com/users/guoguo12/followers","following_url":"https://api.github.com/users/guoguo12/following{/other_user}","gists_url":"https://api.github.com/users/guoguo12/gists{/gist_id}","starred_url":"https://api.github.com/users/guoguo12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guoguo12/subscriptions","organizations_url":"https://api.github.com/users/guoguo12/orgs","repos_url":"https://api.github.com/users/guoguo12/repos","events_url":"https://api.github.com/users/guoguo12/events{/privacy}","received_events_url":"https://api.github.com/users/guoguo12/received_events","type":"User","site_admin":false},"created_at":"2016-07-13T05:38:48Z","updated_at":"2016-07-13T05:38:48Z","body":"Interesting. Well... mine definitely runs faster now. The difference seems to be about 0.1 seconds:\r\n```bash\r\n$ time _z --add /cygdrive/c/Users/guogu_000\r\n\r\nreal    0m0.103s\r\nuser    0m0.030s\r\nsys     0m0.060s\r\n\r\n$ time (_z --add /cygdrive/c/Users/guogu_000 &)\r\n\r\nreal    0m0.006s\r\nuser    0m0.000s\r\nsys     0m0.000s\r\n```"}}
{"actor":{"display_login":"guoguo12"}}