I tried 0.0.7, and it wasn't much better. Had a quick look at the code and have some suggestions:
- keep a list of loaders currently pointing at stopped cargo wagons. This list is what you loop through in 'on-tick'
- use the event 'on_train_changed_state' to find out when trains stop and start, and only search for loaders pointing to cargo wagons when they stop, adding to the above list, and remove from the list when trains start again.
This way, 'on-tick' will only have to do work when there are stopped cargo wagons with loaders. All other times, the list will be empty and it'll be very quick.