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

feature: avoid using yield, which is not supported in some user cases. #8

Closed
membphis opened this issue Mar 3, 2020 · 6 comments · Fixed by #13
Closed

feature: avoid using yield, which is not supported in some user cases. #8

membphis opened this issue Mar 3, 2020 · 6 comments · Fixed by #13
Assignees
Labels
enhancement New feature or request

Comments

@membphis
Copy link
Contributor

membphis commented Mar 3, 2020

apache/apisix#1181 (comment)

@membphis membphis added the enhancement New feature or request label Mar 3, 2020
@membphis
Copy link
Contributor Author

membphis commented Mar 3, 2020

we can pass an array table for storing the generating Lua code.

@membphis
Copy link
Contributor Author

This is not easy, we need to be careful and add more test cases.

@sshniro
Copy link
Contributor

sshniro commented Mar 12, 2020

Yes, I agree @membphis , I would prefer if anyone from the core team can fix it as I'm a beginner to Lua, in case if it is not in the immediate fix list, then I'll give it a try.

@membphis
Copy link
Contributor Author

waiting for your PR ^_^

@sshniro
Copy link
Contributor

sshniro commented Mar 15, 2020

Hi @membphis a small clarification, maybe I'm not understanding the bigger picture here, when I remove the coroutine and simply append the code chunks to a table, it produces the same results as before.

This is not easy

Can I know what things to watch out? and what is the reason to use coroutine here, as a table would also do the job, is it for any performance boost?

@membphis
Copy link
Contributor Author

Can I know what things to watch out? and what is the reason to use coroutine here, as a table would also do the job, is it for any performance boost?

our project base on https://github.com/jdesgats/ljsonschema , you can contact him for more detail things.

As I know, use coroutine is simple but bad performance. I would like the array table way which is better performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants