Skip to content

Websocket/state performance improvement #32

@dedmen

Description

@dedmen

https://github.com/WolfCorps/TacControl/blob/master/src/ArmaExt/src/Networking/websocket.cpp#L81
don't create a new one and clean up the old, if old state has only one reference to it, just move assign.
28% of worker thread time is spent creating new json, 36% is spent cleaning up the old one.

https://github.com/WolfCorps/TacControl/blob/master/src/ArmaExt/src/Networking/websocket.cpp#L88
diff with newState makes no sense, newState has already been moved away and should by now be empty?!

Improvement here:
https://github.com/WolfCorps/TacControl/blob/master/src/ArmaExt/src/Modules/ModuleMarker.cpp#L337

This serialize doesn't support existing content, it always overwrites.
https://github.com/WolfCorps/TacControl/blob/master/src/ArmaExt/src/Networking/Serialize.hpp#L144

If we could write into the existing json object that we already have, instead of always replacing the whole object, we could save quite a bit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions