tips for editing large C# program .linq files?
Sometimes I need to edit to edit a file with is around 1k to 10k lines in size. The vast majority of the lines are from an array declaration (data to be imported) like this:
public ImportRow[] Data = new ImportRow[]
{
new ImportRow { [...row of values...] },
new ImportRow { [...row of values...] },
new ImportRow { [...row of values...] },
[repeat a few thousand times]
};
The editing experience in linqpad works great as usual if I remove most of those lines and just leave a few, but if all the lines are present, editing will often block the UI thread for 30 to 90 seconds at a time.
My current workaround is to cut most of the lines out and put them into another text editor while working on the script, then paste them back in when it's time to run, but it'd be ideal if I didn't need to do that. It's not a horrible workaround, but it's annoying enough that I thought I'd ask for some tricks and tips to help.
Thanks!
public ImportRow[] Data = new ImportRow[]
{
new ImportRow { [...row of values...] },
new ImportRow { [...row of values...] },
new ImportRow { [...row of values...] },
[repeat a few thousand times]
};
The editing experience in linqpad works great as usual if I remove most of those lines and just leave a few, but if all the lines are present, editing will often block the UI thread for 30 to 90 seconds at a time.
My current workaround is to cut most of the lines out and put them into another text editor while working on the script, then paste them back in when it's time to run, but it'd be ideal if I didn't need to do that. It's not a horrible workaround, but it's annoying enough that I thought I'd ask for some tricks and tips to help.
Thanks!
Comments
You could try moving the data declarations into 'My Extensions' (temporarily) although I've not tested the performance impact of this.