- changed component to Router Reborn
Routers scan all connected blocks in one tick
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)
-
reporter -
repo owner 1.1.44 now runs the scan on a background thread. just uploaded will take a minute before it shows
-
repo owner make that 1.1.45 thread in 1.1.44 only run 1 time
-
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.
-
repo owner i will look at that thank you for the info :)
-
repo owner Threads now using pool, max threads can be changed in config :) will be in 1.1.46
-
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.
-
repo owner it is not modifying, only reading it
-
repo owner ah ya, run inv, is not running, it was a test only
-
repo owner ok changed it to runnable and updated naming on crafter, should be ok now.
-
repo owner - changed status to resolved
- Log in to comment