The animate slider is slow with a large CSV file input

I have a large CSV file (~100MB, ~200,000 rows) that I’m parsing with a C# component and then using that data to model some simple extruded and capped geometry. Each row in the CSV file describes geometry that I’m modeling in grasshopper.

I’m using a slider to select a single branch from the datatree where each row of my CSV file results in a branch in the datatree. This is to try and keep the model as light as possible by not modeling all the geometry at once.

I then use the slider animate function to capture a view of the model that is created where each increment of the slider represents one line in the CSV file which is one branch of the datatree:

This all works, but is slower than I would like. If the input CSV file is substantially smaller (say 1MB and 2000 lines), then the animate slider runs much faster.

Any ideas as to why this is the case and how I could go about making the animate slider function faster with the large datafile?

The slider doesn’t seem to be part of the parsing logic, so it’s just a one-time up front cost right?

Can’t say much about the code without seeing the code though. But parsing csv files should be pretty trivial in pure c# if you want to optimise it further.

Hi David,

Thanks for the response.

I’m not so worried about the time the C# parser takes - 1.2 minutes is fine with me since like you say it is just a one time load, but once the parser is done I’d like the animation slider to save frames out as quickly as possible since 200,000 frames already takes 55 hours at 1 second per frame.

With the smaller input file I’m getting more like 10 frames saved out per second. I was hoping that the size of the input file (or the efficiency of my C# code) wouldn’t make much of a difference since I’m just parsing it once and not every time I save out a frame.

I’m just curious if there is something I’m missing here as to why the animate slider is so much slower with the bigger dataset. Is the big datatree an issue? Or maybe I’m just running out of memory…

I’m happy to share my C# code if you’d like to take a look, but I was thinking the problem lies elsewhere?

Thanks for your help!

Yeah I’ll need to repeat it before I can give any advice about what to change. So the file without any unnecessary components and the data.

Hi David,

I’ve attached the Grasshopper file, the CSV file, and the Rhino file.

The CSV file just has the first 2000 rows, not all 200,000. If you want more I’m happy to send it, but I figure copying the first 2000 rows would be just as good?

There isn’t much to the Rhino file - just two points.

Thanks again!

190125 Supporting Rhino File.3dm (29.4 KB)
190125 ways drawing from (15.8 KB)
Ways Only00 2 - (340.1 KB)