{"action":"closed","issue":{"url":"https://api.github.com/repos/dokan-dev/dokany/issues/503","repository_url":"https://api.github.com/repos/dokan-dev/dokany","labels_url":"https://api.github.com/repos/dokan-dev/dokany/issues/503/labels{/name}","comments_url":"https://api.github.com/repos/dokan-dev/dokany/issues/503/comments","events_url":"https://api.github.com/repos/dokan-dev/dokany/issues/503/events","html_url":"https://github.com/dokan-dev/dokany/issues/503","id":226624455,"number":503,"title":"PrintUserName() in mirror should just return if !g_DebugMode","user":{"login":"bailey27","id":17813578,"avatar_url":"https://avatars1.githubusercontent.com/u/17813578?v=3","gravatar_id":"","url":"https://api.github.com/users/bailey27","html_url":"https://github.com/bailey27","followers_url":"https://api.github.com/users/bailey27/followers","following_url":"https://api.github.com/users/bailey27/following{/other_user}","gists_url":"https://api.github.com/users/bailey27/gists{/gist_id}","starred_url":"https://api.github.com/users/bailey27/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bailey27/subscriptions","organizations_url":"https://api.github.com/users/bailey27/orgs","repos_url":"https://api.github.com/users/bailey27/repos","events_url":"https://api.github.com/users/bailey27/events{/privacy}","received_events_url":"https://api.github.com/users/bailey27/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-05-05T16:24:49Z","updated_at":"2017-05-06T05:23:26Z","closed_at":"2017-05-06T05:23:26Z","body":"I think PrintUserName() is very expensive, and maybe it should be made to just return if debug mode is not set.\r\n\r\nFor example:\r\n\r\n```\r\ndiff --git a/samples/dokan_mirror/mirror.c b/samples/dokan_mirror/mirror.c\r\nindex 0f1b767..c0ebe35 100644\r\n--- a/samples/dokan_mirror/mirror.c\r\n+++ b/samples/dokan_mirror/mirror.c\r\n@@ -101,6 +101,9 @@ static void PrintUserName(PDOKAN_FILE_INFO DokanFileInfo) {\r\n   PTOKEN_USER tokenUser;\r\n   SID_NAME_USE snu;\r\n\r\n+  if (!g_DebugMode)\r\n+         return;\r\n+\r\n   handle = DokanOpenRequestorToken(DokanFileInfo);\r\n   if (handle == INVALID_HANDLE_VALUE) {\r\n     DbgPrint(L\"  DokanOpenRequestorToken failed\\n\");\r\n```"}}
{"actor":{"display_login":"Liryna"}}