Kasuromi / GTFO-API

GNU General Public License v3.0
8 stars 7 forks source link

Caching MakeBytes result? #29

Closed Flowaria closed 2 years ago

Flowaria commented 2 years ago

https://github.com/Kasuromi/GTFO-API/blob/3aefbbc9e1c2c916d3c8ffa3799bf1e34e3a2a01/GTFO-API/API/Impl/NetworkAPI_Impl.cs#L103-L136

I think getting eventName's bytes, putting magic numbers, magic replicator numbers could be cached via eventName dictionary to improving NetworkAPI.InvokeEvent's frequent call performance

Kasuromi commented 2 years ago

That sounds like a good idea to me - I'll add caching to events. We also might need to change how receiving is invoked upstream.

Flowaria commented 2 years ago

Fixed on https://github.com/Kasuromi/GTFO-API/pull/40 Closing