Skip to content

Commit 8707934

Browse files
committed
Update advanced-events.md
1 parent 0936311 commit 8707934

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

public/blogs/advanced-events.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,25 +104,25 @@ The true test of any game server architecture is performance under load. Our cli
104104
```rust
105105
// Performance comparison - traditional vs client-aware
106106

107-
// Traditional approach: ~15ms average response time
107+
// Traditional approach
108108
async fn traditional_chat_handler(event: ChatMessage) {
109109
// Process message: 2ms
110110
process_message(&event).await;
111111

112-
// Lookup connection: 8ms (hash map contention)
112+
// Lookup connection
113113
let connection = find_connection(event.player_id).await?;
114114

115115
// Send response: 5ms
116116
connection.send_response(&response).await;
117117
}
118118

119-
// Client-aware approach: ~3ms average response time
119+
// Client-aware approach
120120
events.on_client_with_connection("chat", "message",
121121
|event: ChatMessage, client: ClientConnectionRef| async move {
122-
// Process message: 2ms (same)
122+
// Process message
123123
process_message(&event).await;
124124

125-
// Direct response: 1ms (no lookup needed)
125+
// Direct response
126126
client.respond_json(&response).await;
127127
}
128128
);
@@ -338,7 +338,6 @@ sequenceDiagram
338338
EventSystem->>GORC: Trigger Object Updates
339339
GORC->>Client: Replicate State Changes
340340
341-
Note over Client, GORC: Total latency: 3-5ms for acknowledgment
342341
Note over Handler, Database: Background processing continues
343342
```
344343

0 commit comments

Comments
 (0)