I noticed that Grasshopper is ‘in the background’ testing which type of data is in a tree. (e.g. numbers/booleans/text etc.)
Whenever the Tree is in a ‘data’ component this is not a problem.
However when the Tree is put in a specific component e.g. the ‘number’ component, GH is testing in the background if all data really contain ‘numbers’.
When there is a large data Tree this is becoming unfortunately slow…
Does anybody know if there is an option to ‘ommit’ this data test. (e.g. in case you are 100% sure all data is that specific container contains only numbers (no text?)
2023-10-07 GH data ‘type’ recognizion slow.gh (12.2 KB)
Except your Data object does contain text. All those zeroes are characters, not integers or doubles.
Thanks for your reply, I am honored :).
I understand what you are saying and you are right.
However I see an Theoretically oppertunity to speed up components:
Note: This only works if the user is 100% sure that the data inside a component is of a ‘specific Type’ although marked as another ‘Type’.
e.g. in the example before The data origin are Point coordinates. I have extracted all individual XYZ coordinates (item 0 = X coordienate, items 1 = Y coordinate etc.) Meaning I am 100% sure all data are ‘numbers’.
Would it be possible to have a component that thansforms All data into a ‘specific data type’ e.g. ‘numbers’- without testing what data is actually inside (=this will make the component fast)…
in this example - I simply say. I would like to transform All data labelled as ‘text’ into data labelled as ‘numbers’ (again without testing maiking the component fast).
I agree this is a bit tricky, but if you are 100% right this will work and would lead to a faster script (especially when there are alot of items).
See examples in the attachment.
Hope that it is a bit clear, feel free to ask!
2023-10-07 GH data ‘type’ recognizion slow.gh (25.6 KB)