Routers scan all connected blocks in one tick

Issue #17 resolved
Z903 created an issue

I have a player on my server with a rather large network of connected inventories ~750 and some ~200 routers. Needless to say I am having some issues.

I have reduced the world scan rate to every 200 ticks but its only a stopgap measure. I am requesting that the world scanning be done over several ticks or on a background thread.

I am using 1.1.40 ( its not in the version list )

Comments (11)

  1. Tom Erik Voll repo owner

    1.1.44 now runs the scan on a background thread. just uploaded will take a minute before it shows

  2. Z903 reporter

    Just took a look at the 1.1.44 code and patched the server/clients. The only thing I would comment on is that it looks like each routerTile launches its own thread for the scan. It may be better to use a thread pool, or one thread and a threadsafe queue to add routerTiles to scan.

    Performance is much better with build 1.1.44, job well done.

    Edit: Will look for 1.1.45 tomorrow

    Edit2: You may also be able to update multiple routers with one scan.

  3. Z903 reporter

    Looking awesome, some things to note.

    You should not modify the world from another thread (runInvThread) so be carefull :) . Most of minecraft and forge is not threadsafe. Your 'scanInvThread' should implement Runnable instead of extending thread.

  4. Log in to comment