c# - very long computations make c# program not responding or unclickable workaround
I have a program that does thorough computations for millions of records. Sometimes, it runs for more than an hour, sometimes about 30 minutes. During that time the program is not responding or unclickable. Is there any workaround for this? Like, the loading mouse icon.

Another problem is that if I make two dictionaries as datasource of datagrid, it's very slow compared to reading a csv file and putting it in to datagrid. Here's the algo:

    for i = 0 to last record
        datarow row = new datarow
        put i to row[0]
        put names[i] to row[1]
        put comments[i] to row[2]
        add row to datatable
    end for loop
    datatable.acceptchanges()
    datagridview.datasource = datatable

Note: names[i] and comments[i] are dictionaries. However, if i just read from a csv file with almost the same loop and put it into datatable and make it as datasource of datagridview, it's faster (about 5-10 minutes compared to 20 minutes of dictionaries). Is there any workaround for that?
c# - very long computations make c# program not responding or unclickable workaround
===

I have a program that does thorough computations for millions of records. Sometimes, it runs for more than an hour, sometimes about 30 minutes. During that time the program is not responding or unclickable. Is there any workaround for this? Like, the loading mouse icon.

Another problem is that if I make two dictionaries as datasource of datagrid, it's very slow compared to reading a csv file and putting it in to datagrid. Here's the algo:

    for i = 0 to last record
        datarow row = new datarow
        put i to row[0]
        put names[i] to row[1]
        put comments[i] to row[2]
        add row to datatable
    end for loop
    datatable.acceptchanges()
    datagridview.datasource = datatable

Note: names[i] and comments[i] are dictionaries. However, if i just read from a csv file with almost the same loop and put it into datatable and make it as datasource of datagridview, it's faster (about 5-10 minutes compared to 20 minutes of dictionaries). Is there any workaround for that?