#Is it possible to use parallelism in Scripting?

1 messages · Page 1 of 1 (latest)

thick pike
#

Hey all,

Just been trying to improve performance of my map, and have a solution to move one of my entity/function combinations into a block/script combination.
Where I store the positions of each block in a Dynamic Property (calculated I can have up to 2520 coords stored in a string)

32,767 chars / 13 chars ("1234,12,1234;") = 2520 coords

So then roughly every tick or two, I want to loop over the positions in parallel, and perform operations.

Please let me know if this is possible 🙂 And also if you think its a good idea.

I feel like its more performant than running scriptevent at every entity. Rather looping over positions of static blocks (also reduces entities in the world)

royal solar
#

paralel can only be done with multiple threads

#

scriptsa api is single threaded

thick pike
#

Ah shit. So do you think it could loop over 2000 positions quite fast in single-threaded fashion? Checking blocks and such.

#

Or would it constantly spam slow-running script you think?

#

Guess the best way is to try, must do some tests. Also wanting to try chain dynamic properties together to support more positions. idk