This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
tinynja98's profile picture

Speed up turtle inventory management?

Started by tinynja98, 12 July 2015 - 07:50 PM
tinynja98 #1
Posted 12 July 2015 - 09:50 PM
Recently, i have written a turtle program to compress the cobblestone (cuz why not…) with extra utilities crafting recipes. I realized that the crafting was pretty slow. So, i wrote another very basic program to check what was wrong.

Here is the script of that basic program:
turtle.select(1)
for i = 2,16 do
  startTime = os.clock()
  turtle.transferTo(i,4)
  print(os.clock()-time.."s")
end

And here's the output:
0.05s
0.4s
0.4s
0.4s
etc.

1. Why is transfering items so slow?
2. Is there any way to make it faster?
SquidDev #2
Posted 12 July 2015 - 10:07 PM
1. Why is transfering items so slow?
2. Is there any way to make it faster?

All turtle actions are executed on world tick, instead of straight away. This means there is a slight delay. After every action, an animation is played. This might be the turtle moving, digging or, in the case of transferTo, standing still for several ticks. In short, there is no way to speed it up.

As you have XU installed, you could use world interaction upgrades on a crafting table - it will be faster (but more expensive).
Edited on 12 July 2015 - 08:08 PM
jerimo #3
Posted 14 July 2015 - 04:57 PM
I've been dong something similar in my base as well, but if you don't mind my asking; why do you need it to go faster?

If you have it take fromna chest above it, it'll always bedone before you come back from another mining run or however else you get your stuff, hence no need for it to be quicker?