Grasshopper

algorithmic modeling for Rhino

I know the profiler is not that accurate. However , VB components appear to be very slow even when they only contain  1 or 2 lines of simple code. For ex, 3 string replace operations may take 12 ms with 3 replace components and 300ms with a VB component. Why is that?

Views: 417

Replies to This Discussion

Hi Matthew,

 

are you sure that those 300ms is actual runtime performance? When you change the source inside a VB component, it has to compile the code the first time around. This time is added to the performance counter, but only on the first iteration.

 

If you change the string input but not the source code, does it still take 300ms?

 

--

David Rutten

david@mcneel.com

Delft, NL

Hi David,

 

I am not sure. I suspected that compile time was the culprit but I can't really establish that because I get an inconsistent response on profiler readouts. I have attached an image to illustrate. I never get readouts on all of my components and I do not consistently get overall calc times in the bottom right status line. This has been true throughout the last several GH revisions. However, when I do recalculate the calc time flags on my VB components disappear altogether. Does that mean their contribution to overall calc time is close to insignificant as far as the profiler is concerned?

 

Many thanks,

Matt

Attachments:

Yes, anything that takes less than 3ms is not displayed by the profiler. It's a bit of an arbitrary threshold I agree, but 5ms seemed too coarse in my opinion and 1ms still draws too many widgets.

 

--

David Rutten

david@mcneel.com

Leusden, NL

Got it. That helps a lot.

 

Thanks

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service