Page MenuHomeFeedback Tracker

[Feature Request] Multithreading for some commands if possible
New, NormalPublic

Description

Some of these commands might be multithreadable, which could make them faster:

//arrays
arrayIntersect
insertAt (if there's a "only if unique" parameter)
inAreaArray
pushBack/pushBackUnique/append/set (multithreaded checking of the nested arrays)

//positions
selectBestPlaces (multithreaded sampling of random positions)
findEmptyPosition
findEmptyPositionReady
isFlatEmpty

//controls
tvExpandAll
tvSortAll
tvSortByValueAll

//misc
lineIntersectsSurfaces (checking both lods at the same time? or maybe even breaking up the search line in full search mode, -1)

maybe near(est)XXX commands too?

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 7
Category
Feature Request

Event Timeline

Leopard20 updated the task description. (Show Details)
R3vo added a subscriber: R3vo.Dec 8 2020, 12:38 AM

Perhaps

sort?

Leopard20 updated the task description. (Show Details)Dec 8 2020, 12:47 AM
dedmen added a subscriber: dedmen.Dec 10 2020, 10:13 AM

pushBack/pushBackUnique/append/set (multithreaded checking of the nested arrays)

Due to the overhead of launching multithreaded stuff, I only want to enable multithreading if the overhead is worth it and doesn't make the command slower.
That is really hard to judge here as you don't know how deeply nested the array will be.

inAreaArray

inAreaArray is also already really fast isn't it?

The MT optimizations are basically only possible if the command takes more that 0.120ms

tvExpandAll
tvSortAll
tvSortByValueAll

I think R3vo said these are very fast? Also these are highly recursive, which makes multithreading harder (not an option for tvExpandAll at all)

inAreaArray is also already really fast isn't it?

Yeah. I didn't expect the overhead to be so big.

I think R3vo said these are very fast? Also these are highly recursive, which makes multithreading harder

I don't know. I didn't test them after the fix. But they can get slower than 0.120 ms depending on how big the tree is.
I'm not sure if it's worth implementing.

R3vo added a comment.Dec 10 2020, 11:10 PM

tvExpandAll
tvSortAll
tvSortByValueAll

They are fast enough for all use-cases. Sorting a list with 100k entries takes like no time at all

R3vo removed a subscriber: R3vo.Jul 21 2021, 6:11 PM