Measuring and Reducing MMapper Latency #461
KasparMetsa
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Motivation
In competitive PK, every millisecond counts. Many veteran players have long held that JMC 3.26 (without VBScripts) is the fastest possible mud client setup for MUME. That claim has never been properly measured.
It would be valuable to quantify MMapper's proxy overhead so we can:
The goal is not to eliminate all overhead — MMapper does significantly more processing
than a raw telnet client (XML parsing, pathfinding, map rendering, group management).
But we should know the cost and avoid paying more than necessary.
MMapper's Processing Pipeline
Every line from MUME passes through this chain before reaching the client:
The likely bottlenecks are the XML parser (character-by-character processing),
pathfinding (A* search on the room graph), and map rendering (OpenGL draw calls).
Proposed Measurement Approaches
1. End-to-end: Camera-based measurement
Follow the approach used by hardware latency reviewers: record keyboard and screen with
a high-speed camera. Count frames between keypress and visible output. This gives the
most realistic measurement of what a player actually experiences.
Configurations to compare:
2. Internal: Proxy processing time
Since hardware differences can skew end-to-end results, also measure a controlled
internal metric: time from receiving a line from MUME to writing the processed output
to the client socket. This isolates MMapper's overhead from display rendering, OS
scheduling, and network variance.
MMapper already has a
DECL_TIMERmacro (src/global/Timer.h) usingstd::chrono::steady_clock, currently used in map rendering and pathfinding. The parserpipeline (
MumeXmlParser,AbstractParser,Proxy) does not currently have timinginstrumentation — adding it to the critical path would give immediate visibility into
where time is spent.
Key measurement points to add:
MumeXmlParser::parse()PathMachine::slot_handleParseEvent()Proxyreceive-to-send3. Reproducible: Standalone benchmark harness
Create a small benchmark tool that removes all external variables:
This would allow:
Open Questions
before the canvas finishes drawing?
affecting correctness?
ClientTelnetviaVirtualSocket) have different latencycharacteristics than an external client connected via TCP?
Beta Was this translation helpful? Give feedback.
All reactions