Grasshopper

algorithmic modeling for Rhino

Very slow redraw speeds on large string output in panel, and parameter tooltip.

Maybe not a very common usecase, and I know now how to work around it, but still noteworthy:

I'm debugging some stuff that exports a big json string. I've noticed that when the data is split up in a list of lines, there is no problem. However, if the data is in one string the panel component and the hover component become very unresponsive. (With too big a model/json string it would crash)

 

Reproducing is easy: use the read file component with read individual lines set to false. This is the data used:

http://pastebin.com/8nRz29LS

 

Views: 606

Replies to This Discussion

Hi Arend,

 

very little I can do about that I'm afraid, I draw the separate strings individually and can thus skip whichever ones aren't visible, but single blocks of text have to be drawn in one go by the GDI DrawString() method which is just dog slow for large strings.

 

Maybe you can use the DataViewer to see the strings? That seems to be a lot faster. I'll see about fixing the tooltip (that shouldn't be too hard), but I cannot guarantee I'll be able to speed up panel display.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Ok, cool! No problem, I've solved it by splitting them up myself, and everything goes nicely. Just wanted to share since it dramatically bogs up cpu on hover. I understand that it's a difficult problem to handle: the only thing I can think of that it's perhaps it possible to set a limit to the size of the string that the panel will render, and throw a warning with that.

Hi David,

I don't now if you saw a resent request of mine as you were off to London, but I was wondering if you could implement a option of the Param Viewer whereby it didn't display either the string or the tree view. so you could get the path structure as a string without the display bogging down the process.

Makes sense. Just making the two panels collapsible should do the trick I guess.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

I adjusted Tooltip display so you only see the first 80 characters of any description.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service