Closed Sirse closed 7 years ago
Another report here~ Great improvement compared with the former version, hope to optimize further. A serious problem is that its packets are almost empty(with about 20% of space used), so it's here you can also do efforts to make it better.
@yesterday17, "empty" packets, if i correctly understand you, are size optimization. MF uses custom TEUpdate packets to reduce their size, it sends only changed values, but sends messages every second.
Sure, just like this: The dots are 0 in packets and you can see there're too many space not used but sent in packet, which used great amount of network resource.
Should be fixed via https://github.com/Sirse/MineFantasyII-Cont/pull/8 pull request. Thx to @yesterday17, i know about PlayerManager's methods getPlayersWatchingChunk and sendToAllWatching, but don't know about Railcraft workaround.
@Sirse Sadly, #8 only reduced the packet sending, but didn't do anything about the packet itself. The structure of the packet still has some problems, and i don't know much about this...
Constant Server>Client synchronization: every second most TE sends own custom update packet. Custom packets are better solution than using getDescriptionPacket and onDataPacket methods (reduced packet size), but in MF they are used for dirty things. That causes REALLY huge traffic/bandwidth usage (about 1.8TB outgoing traffic per mouth and 4mb/sec of bandwidth).
Sync should be runned only on TE's condition change (e.g: when player adds fuel to firepit). All time calculations should be double-sided (on client for tooltips and GUIs and on server for data validation).
Referenced issue: https://github.com/AnonymousProductions/MineFantasyII-Cont/issues/9
Sorry me my bad english, i'm russian.