I noticed that this mod is somewhat similar to GhostScanner, would you be able to combine those two? i.e. make GhostScanner way more efficient with the async method.
I think this is a question better asked to the author of GhostScanner. They can look at my code and do things my way to improve the performance in their mod.
But I am not planning on including GhostScanner functionality into this mod.
I had some time ad reworked it my self. but I also noticed that this "async" isn't really async. it's just a stack that will be worked down on each tick.
Indeed it is not truly async. There is no way to make it perfectly async either as Factorio needs to be completely deterministic. Processing a small amount of work every tick does however make it a lot smoother and improves the game experience. And is as far async as you can get it.