Script on tag value changed

does it make a difference if the tag reference in the below script is in the same folder or in a different folder?
same folder
if currentValue.value == 12 or currentValue.value == 20 or currentValue.value == 4:
crank_max = system.tag.readBlocking(["[.]Crank_max"])[0].value
system.tag.writeBlocking(["[.]P8_C_Target"], [crank_max])

different folder
if currentValue.value == 12 or currentValue.value == 20 or currentValue.value == 4:
main_max = system.tag.readBlocking(["[.]../IC_Main_Hr/Main_max"])[0].value
system.tag.writeBlocking(["[.]P8_M_Target"], [main_max])

Not particularly, no.

It makes little to no difference as the tag path will need to be resolved anyway, perhaps that code is short-circuiting, I don't actually know, but I wouldn't think that it will gain you much.

However, you should definitely be using system.tag.writeAsync() here, particuarly if your tags are changing often or if you have many of this type of thing in your tags.

if currentValue.value in (12,20,4):
    crankMax = system.tag.readBlocking(['[.]Crank_Max'])[0].value
    system.tag.writeAsync(['[.]P8_C_Target'],[crank_max]) 

Even better would be to make the 'P8_C_Target' and 'P8_M_Target' tags expression or driven tags.

https://docs.inductiveautomation.com/display/DOC81/Types+of+Tags