You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "xuruidong (via GitHub)" <gi...@apache.org> on 2023/08/27 16:03:43 UTC

[GitHub] [apisix] xuruidong commented on pull request #10090: perf(core): optmize "response.exit"

xuruidong commented on PR #10090:
URL: https://github.com/apache/apisix/pull/10090#issuecomment-1694703216

   By the way, is it necessary to implement the `core.response.exit` as a vararg function?
   There are some strange usages:
   ```
   core.response.exit(200, { message = "msg1" }, "string-arg")
   core.response.exit(200, { message = "msg1" }, { message2 = "msg2" })
   ```
   I think `core.response.exit(status_code, data)` is enough. If the function declaration can be simplified, maybe the `for-loop` and `encode_json`  in `core.response.exit` can be removed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org