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

Poor performance of concatList Value() method #488

Closed
hzhaop opened this issue Feb 22, 2022 · 1 comment · Fixed by #491
Closed

Poor performance of concatList Value() method #488

hzhaop opened this issue Feb 22, 2022 · 1 comment · Fixed by #491

Comments

@hzhaop
Copy link

hzhaop commented Feb 22, 2022

hi, all,

expression: data.map(item, item.id)
input:
{"data": [{"id": "1"}, {"id": "2"}, ... , {"id": "1000"}]}

I call the Value() method of the program.Eval() output, find it very slow to return the value.

I find out that it's because data.map(item, item.id) produce a concatList, which is very slow in Value() method. (about O(N^2) complexity)

Is there any workaround method that I could enhance this expression performance?

@TristonianJones
Copy link
Collaborator

TristonianJones commented Feb 22, 2022

#491 should improve evaluation speed by 40x and ensure that the call to Value() is a constant time operation. The combination of the two effects should yield an even more significant performance boost for this use case.

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 a pull request may close this issue.

2 participants