mt-mods / mt-mods/technic

High time usage for network exec

Open
#148 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Performance Testing needed
Dominant language
Lua
Stars
23
Forks
33
PR merge metrics
No merged PRs in 30d

Description

So I built (at pandorabox server, public mine) bit over 3000 cable, 60 generator, ~25 consumer MV network.
About 100kEU MV hydro tower.
Few supply converters, maybe 7 - 8.
Some MV tool workshops, about 12 maybe.
2 - 4 MV alloy furnaces.
No battery boxes.

High cable count is because machines are scattered over a large area forming small clusters each with additional HV network drawing power from main MV network through supply converters.

Network generally reports about 2 - 4ms time usage but sometime for few moments a lot more, around 80 - 600ms.
High values for lag metrics seems to happen when network gets activated after being away from area for some time.

Find out what causes this and if it can be fixed somehow.

I suspect this but it can be something else too:
https://github.com/mt-mods/technic/blob/62d523e368c38d31a48e37084542acc2ebc51eb1/technic/machines/network.lua#L454-L458

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in technic/machines/network.lua at lines 454-458 and reproduce network activation after returning to the area while watching the reported time usage. Trace the timing spike to its cause and verify that the high usage is resolved; the issue does not name a test.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
networking, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.