-
Notifications
You must be signed in to change notification settings - Fork 348
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
performance optimization by ReifyStatement #823
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks awesome!
Is it finished? If yes then please rebase changes into single commit
token2sql(expanded, liftingPlaceholder) | ||
} | ||
|
||
private def token2sql(token: Token, liftingPlaceholder: Int => String): (String, List[ScalarLift]) = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please rename it, quill-core
is not bound to sql, cql etc.
} | ||
|
||
private def token2sql(token: Token, liftingPlaceholder: Int => String): (String, List[ScalarLift]) = { | ||
@tailrec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could simply convert the List
to Vector
to solve append
performance
@jilen the |
Thank you! |
Problem
the
query
will take long long time when ids size is big (E.g 100000)😭 #811 is not solve it completely
Solution
use the
O(n)
algorithm to replace the oldO(n*2)
algorithmResult
test code
database is empty
before : 71145.496378 ms
after : 776.846794 ms
😄
Checklist
README.md
if applicable[WIP]
to the pull request title if it's work in progresssbt scalariformFormat test:scalariformFormat
to make sure that the source files are formatted@getquill/maintainers