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

Improve query generation performance #241

Merged
merged 1 commit into from Apr 23, 2018

Conversation

Projects
None yet
2 participants
@brantburnett
Contributor

brantburnett commented Apr 23, 2018

Motivation

Reduce redundant initialization and heap allocations during the query
generation process to improve performance.

Modifications

Cache certain readonly parts of the QueryParser statically and reuse for
each query.

Move unnecessary QueryFactory to the unit test project.

Results

In rough testing of generating 100,000 N1Ql queries from a basic LINQ
query, run time was reduced by approximately 73%. This number is only
for the query generation step, moving from an already built LINQ query
to a N1QL string, and does not account for query runtime.

Improve query generation performance
Motivation
----------
Reduce redundant initialization and heap allocations during the query
generation process to improve performance.

Modifications
-------------
Cache certain readonly parts of the QueryParser statically and reuse for
each query.

Move unnecessary QueryFactory to the unit test project.

Results
-------
In rough testing of generating 100,000 N1Ql queries from a basic LINQ
query, run time was reduced by approximately 73%.  This number is only
for the query generation step, moving from an already built LINQ query
to a N1QL string, and does not account for query runtime.

@jeffrymorris jeffrymorris merged commit cde8c0b into couchbaselabs:master Apr 23, 2018

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@jeffrymorris

This comment has been minimized.

Contributor

jeffrymorris commented Apr 23, 2018

Thanks @brantburnett

@brantburnett brantburnett deleted the brantburnett:perf branch Apr 23, 2018

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