rust-server
rust-server copied to clipboard
Skip event Lua to Rust struct conversion if there are no active event streams
Converting an event to a Rust struct is a costly operation (not as costly as Lua -> JSON -> Rust would be though). We should thus update the implementation to only make the conversion if necessary.
Implementation:
- Check whether either the log level is set to debug, or if there is at least on active events stream.
- If yes, convert the event to a struct and continue as usual
- If no, just ignore the event