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 GQLParser by using raw buffer instead of istream #445

Merged
merged 4 commits into from
Jun 27, 2019
Merged

Optimize GQLParser by using raw buffer instead of istream #445

merged 4 commits into from
Jun 27, 2019

Conversation

dutor
Copy link
Contributor

@dutor dutor commented May 27, 2019

Now, there are still two instances of std::istream(yyin) and std::ostream(yyout) left in the yyFlexLexer class, i.e. the base class of GraphScanner, which is provided by Flex, which we cannot optimize them away directly.

For a workaround, we could make the whole parser reentrant, even on the failure cases, so that the parser could be used as a static, thread-local instance.

@dutor dutor added the ready-for-testing PR: ready for the CI test label May 27, 2019
@dutor
Copy link
Contributor Author

dutor commented May 27, 2019

Jenkins, please run tests.

@nebula-community-bot
Copy link
Member

Unit testing failed.

@nebula-community-bot
Copy link
Member

Unit testing passed.

@nebula-community-bot
Copy link
Member

Unit testing failed.

@dutor
Copy link
Contributor Author

dutor commented May 27, 2019

Unit testing failed.

Due to failure in raft, jenkins please run tests again!

@nebula-community-bot
Copy link
Member

Unit testing passed.

boshengchen
boshengchen previously approved these changes May 29, 2019
Copy link
Contributor

@boshengchen boshengchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !
Awesome work! 👍

@nebula-community-bot
Copy link
Member

Unit testing passed.

@nebula-community-bot
Copy link
Member

Unit testing passed.

Copy link
Contributor

@laura-ding laura-ding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done

Copy link
Contributor

@CPWstatic CPWstatic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job!

@nebula-community-bot
Copy link
Member

Unit testing failed.

@dutor
Copy link
Contributor Author

dutor commented Jun 27, 2019

Jenkins, go!

@nebula-community-bot
Copy link
Member

Unit testing passed.

@dutor dutor merged commit 44a6de2 into vesoft-inc:master Jun 27, 2019
@dutor dutor deleted the optimize-parser branch June 27, 2019 01:51
yixinglu pushed a commit to yixinglu/nebula that referenced this pull request Feb 16, 2020
…#445)

* Optimize GQLParser by using raw buffer instead of istream

* Fixed ScannerTest

* Fixed an memory leak on parsing failure
tong-hao pushed a commit to tong-hao/nebula that referenced this pull request Jun 1, 2021
…#445)

* Optimize GQLParser by using raw buffer instead of istream

* Fixed ScannerTest

* Fixed an memory leak on parsing failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants