{"action":"created","issue":{"url":"https://api.github.com/repos/pyserial/pyserial/issues/303","repository_url":"https://api.github.com/repos/pyserial/pyserial","labels_url":"https://api.github.com/repos/pyserial/pyserial/issues/303/labels{/name}","comments_url":"https://api.github.com/repos/pyserial/pyserial/issues/303/comments","events_url":"https://api.github.com/repos/pyserial/pyserial/issues/303/events","html_url":"https://github.com/pyserial/pyserial/pull/303","id":288051174,"number":303,"title":"Skip link detection in Windows","user":{"login":"aivarannamaa","id":1802,"avatar_url":"https://avatars0.githubusercontent.com/u/1802?v=4","gravatar_id":"","url":"https://api.github.com/users/aivarannamaa","html_url":"https://github.com/aivarannamaa","followers_url":"https://api.github.com/users/aivarannamaa/followers","following_url":"https://api.github.com/users/aivarannamaa/following{/other_user}","gists_url":"https://api.github.com/users/aivarannamaa/gists{/gist_id}","starred_url":"https://api.github.com/users/aivarannamaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aivarannamaa/subscriptions","organizations_url":"https://api.github.com/users/aivarannamaa/orgs","repos_url":"https://api.github.com/users/aivarannamaa/repos","events_url":"https://api.github.com/users/aivarannamaa/events{/privacy}","received_events_url":"https://api.github.com/users/aivarannamaa/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-01-12T09:08:17Z","updated_at":"2018-05-07T17:43:29Z","closed_at":"2018-05-07T17:42:04Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/pyserial/pyserial/pulls/303","html_url":"https://github.com/pyserial/pyserial/pull/303","diff_url":"https://github.com/pyserial/pyserial/pull/303.diff","patch_url":"https://github.com/pyserial/pyserial/pull/303.patch"},"body":"If `p` is a Serial over Bluetooth link, then `os.path.islink(p)` may take several seconds.\r\n\r\nIn two of my Windows 10 computers following code used to take 5 seconds:\r\n\r\n```\r\nfrom serial.tools.list_ports import comports\r\nfor p in comports():\r\n    print(p)\r\n```\r\nI found out that the delay was caused by `os.path.islink('COM5')`. COM5 is one of the \"Bluetooth over serial\" ports backed by LogiLink Bluetooth dongle.\r\n\r\nAfter my change it takes 0.01 seconds.\r\n\r\nIf I'm not mistaken, then `list_ports_windows` can't list symlinks anyway, so this time consuming check can be turned off for Windows."},"comment":{"url":"https://api.github.com/repos/pyserial/pyserial/issues/comments/387145208","html_url":"https://github.com/pyserial/pyserial/pull/303#issuecomment-387145208","issue_url":"https://api.github.com/repos/pyserial/pyserial/issues/303","id":387145208,"user":{"login":"zsquareplusc","id":10556012,"avatar_url":"https://avatars2.githubusercontent.com/u/10556012?v=4","gravatar_id":"","url":"https://api.github.com/users/zsquareplusc","html_url":"https://github.com/zsquareplusc","followers_url":"https://api.github.com/users/zsquareplusc/followers","following_url":"https://api.github.com/users/zsquareplusc/following{/other_user}","gists_url":"https://api.github.com/users/zsquareplusc/gists{/gist_id}","starred_url":"https://api.github.com/users/zsquareplusc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zsquareplusc/subscriptions","organizations_url":"https://api.github.com/users/zsquareplusc/orgs","repos_url":"https://api.github.com/users/zsquareplusc/repos","events_url":"https://api.github.com/users/zsquareplusc/events{/privacy}","received_events_url":"https://api.github.com/users/zsquareplusc/received_events","type":"User","site_admin":false},"created_at":"2018-05-07T17:43:29Z","updated_at":"2018-05-07T17:43:29Z","author_association":"OWNER","body":"Right, that could be skipped.\r\n\r\nWhat I do not like is that this introduces a new method to check for the platform and makes that module platform dependent too. I guess it easier to add a parameter to the `ListPortInfo` constructor. I've implemented that."}}
{"actor":{"display_login":"zsquareplusc"}}