Frequency redstone VS Loop command block,performance?
I want to make a clock with a precision of one second.
So,there are two ways to do this.
1、a redstone clock.(one second)And a commond_block [/scoreboard players add @e[name=Time] Time 1.
2、3 commond_block and two Scoreboard. first,/scoreboard players add @e[name=Time] Tick 1. then,/scoreboard players set @e[name=Time,score_Tick_min=20] Tick 0 last,/scoreboard players add @e[name=Time,score_Tick=20,score_Tick_min=20] Time 1
Which one consumes less performance?And why?
Solution 1:
In general, redstone is evil for performance. Especially depowering redstone dust causes a lot of lag. Pure command blocks are almost always better, but even better are functions. They are especially optimised and they don't require the slightly lag causing tile entities of command blocks.
And even that can be further optimised in 1.14, using /schedule
(archive). Just add this at the end of your function:
schedule function <function> 20
Alternatively, you can write "1 second" directly:
schedule function <function> 1s