Open chabad360 opened 3 years ago
@hypebeast?
@chabad360 are you still planning to complete this PR and merge the improvements?
I would love to, but I would kinda prefer to split osc.go
into multiple separate files before finishing this up. It's a lot of changes, so it would be better to push this once the changes are more clear. However, if @hypebeast would prefer to do this first, I'll gladly finish it up.
@giohappy and anyone else who's interested in this: I would recommend trying to use my fork, it has some api changes (that I believe are sane and make it more idiomatic), I'm actively maintaining it, so at least I'll be more quick to fix bugs.
I have tried this fork, and sadly this isn't functional in a real world environment, as the decoder panics on empty strings. In general issuing fatal errors on decoding of invalid packets on a server is a door for DoS attacks and should be avoided if possible.
The forked repository also doesn't have issue tracker enabled for reporting such issues with it.
Oh, yes. I know about that, it bit me in back side pretty hard already. Very poor decision on my part (I don't actually remember why I made it do that). I used a temporary fix in my application, but in a week or two I'm going to be going on a bit of a bug hunt/major rewrite. So it'll be fixed then.
I'll enable issue tracker later today.
Here are a large number of performance improvements. I want to move the discussion over from #47 as it's not possible to comment on actual code in an issue.
This code is not intended to be merged, while it is functional, it is primarily for discussion. I would rather wait until the repo has been restructured into separate files, as that will make it easier to digest the changes.
Just to give an idea of the performance improvement [1]:
Server.ReceivePacket()
ParsePacket()
Message.String()
Message.MarshalBinary()
[1]: https://replit.com/@chabad360/go-osc-benchmark