theganyo/lua2go

make Go mathod call non-blocking

onlynishant opened this issue · 0 comments

Hi,

I use it in Openresty. My lua code calls a Go method via lua2go that internally calls other remote database server. Initially this Go method was running as separate process. After adding it as shared lib overall throughput (Query per second) decreased drastically. I have generated flame graph and it shows that majority of the execution time is consumed by C:lj_cf_ffi_meta___call. I guess it's because of blocking nature of lua2go. How can i make it non-blocking (something like http lib of openresty) to increase throughput of server?