Faster parse #30

Merged
merged 1 commit into from Aug 27, 2014

Conversation

Projects
None yet
2 participants
@suzaku
Contributor

suzaku commented Aug 27, 2014

Group all elements we want to parse in one parser so that we can parse
the thrift file in one go.

@lxyu

Faster parse
Group all elements we want to parse in one parser so that we can parse
the thrift file in one go.
+ for parse_results, _, _ in parser.scanString(schema):
+ for res in parse_results:
+ if res.getName() == 'typedefs':
+ result[res.getName()][res.name] = res.ttype

This comment has been minimized.

@lxyu

lxyu Aug 27, 2014

Contributor

这里的 res.getName() 直接换成 typedefs 是不是更好些?

@lxyu

lxyu Aug 27, 2014

Contributor

这里的 res.getName() 直接换成 typedefs 是不是更好些?

This comment has been minimized.

@suzaku

suzaku Aug 27, 2014

Contributor

@lxyu 嗯 会快一点 你比较熟悉这个数据结构的构造 能想到什么更简洁的方式来拼出来吗?

@suzaku

suzaku Aug 27, 2014

Contributor

@lxyu 嗯 会快一点 你比较熟悉这个数据结构的构造 能想到什么更简洁的方式来拼出来吗?

This comment has been minimized.

@lxyu

lxyu Aug 27, 2014

Contributor

不如这里直接 result[res.getName()].append(res),统一到 load 里面处理?

@lxyu

lxyu Aug 27, 2014

Contributor

不如这里直接 result[res.getName()].append(res),统一到 load 里面处理?

This comment has been minimized.

@lxyu

lxyu Aug 27, 2014

Contributor

这里直接一个 comprehension 出来就行了。

@lxyu

lxyu Aug 27, 2014

Contributor

这里直接一个 comprehension 出来就行了。

This comment has been minimized.

@suzaku

suzaku Aug 27, 2014

Contributor

@lxyu load那边我还没细看,改动大吗?

@suzaku

suzaku Aug 27, 2014

Contributor

@lxyu load那边我还没细看,改动大吗?

This comment has been minimized.

@lxyu

lxyu Aug 27, 2014

Contributor

应该不大,我来搞定好了~

@lxyu

lxyu Aug 27, 2014

Contributor

应该不大,我来搞定好了~

lxyu added a commit that referenced this pull request Aug 27, 2014

@lxyu lxyu merged commit 9e0f178 into eleme:develop Aug 27, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@pyup-bot pyup-bot referenced this pull request in scieloorg/opac_proc Aug 18, 2016

Closed

Initial Update #10

@pyup-bot pyup-bot referenced this pull request in scieloorg/scielo-manager Aug 26, 2016

Closed

Pin thriftpy to latest version 0.3.9 #1314

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment