{"action":"closed","issue":{"url":"https://api.github.com/repos/waditu/tushare/issues/566","repository_url":"https://api.github.com/repos/waditu/tushare","labels_url":"https://api.github.com/repos/waditu/tushare/issues/566/labels{/name}","comments_url":"https://api.github.com/repos/waditu/tushare/issues/566/comments","events_url":"https://api.github.com/repos/waditu/tushare/issues/566/events","html_url":"https://github.com/waditu/tushare/issues/566","id":284680661,"number":566,"title":"关于获取A股实时数据,性能上的建议","user":{"login":"CodeNewman","id":13009874,"avatar_url":"https://avatars2.githubusercontent.com/u/13009874?v=4","gravatar_id":"","url":"https://api.github.com/users/CodeNewman","html_url":"https://github.com/CodeNewman","followers_url":"https://api.github.com/users/CodeNewman/followers","following_url":"https://api.github.com/users/CodeNewman/following{/other_user}","gists_url":"https://api.github.com/users/CodeNewman/gists{/gist_id}","starred_url":"https://api.github.com/users/CodeNewman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodeNewman/subscriptions","organizations_url":"https://api.github.com/users/CodeNewman/orgs","repos_url":"https://api.github.com/users/CodeNewman/repos","events_url":"https://api.github.com/users/CodeNewman/events{/privacy}","received_events_url":"https://api.github.com/users/CodeNewman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-12-27T09:07:16Z","updated_at":"2017-12-30T13:55:29Z","closed_at":"2017-12-30T13:55:29Z","author_association":"NONE","body":"我看源码发现, tushare针对A股数据, 底层调用的是通达信的pytdx接口(https://github.com/rainx/pytdx)\r\n每次传参, 获取数据条数默认800条, 是静态值. 这就导致, 当我们对实时响应性能有要求时, tushare返回数据会很慢, 例如, 我们只要2条数据, 然而tushare还是会先从pytdx获取800条数据, 然后将2条数据返回给我们.\r\n\r\n建议, 将800静态值改成变量, 直接外部传参可配置. 这样当上层需要几条数据, 直接就从pythx中获取几条数据就可以了."}}
{"actor":{"display_login":"jimmysoa"}}