Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize python parsers. #2346

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Oct 8, 2015

This restructures the two python parsers to return a parser that re-uses
as much symbol table setup as possible across individual file parses.

https://rbcommons.com/s/twitter/r/2947/

The fundamental restructuring is moving from Addressed values to a
class-housed schema of addressable fields powered by a @property-like
`AddressableDescriptor` with write-once semantics and that can contain
`Resolvable` values in addition to opaque address strings and concrete
values.  This move reduces the memory requirements of parsing objects,
they are now just an object with a single `_kwargs` dict of unadorned
string address values in the addressable field case.

With the `Resolvable` type plumbed into addressable schemas, both the
json encoder and the Graph gain the ability to materialize or serialize
shallow or inlined graphs bringing the testable space of the noun side
of the experiment up to 3 parsers x 2 graph modes.
This is part of support for inter-operation with legacy BUILD files.
This restructures the two python parsers to return a parser that re-uses
as much symbol table setup as possible across individual file parses.
@jsirois
Copy link
Member Author

jsirois commented Oct 8, 2015

More work towards #2308. In particular in this case more performant parsing in the legacy BUILD file ecosystem.

@jsirois
Copy link
Member Author

jsirois commented Oct 8, 2015

This was split out of #2312

@jsirois
Copy link
Member Author

jsirois commented Oct 9, 2015

Submitted @ 24d8a16

@jsirois jsirois closed this Oct 9, 2015
@jsirois jsirois deleted the jsirois/engine/parsers/reduce_per_parse_state branch October 9, 2015 16:38
@jsirois jsirois added the engine label Oct 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant