Note that there are some explanatory texts on larger screens.

plurals
  1. POFastest way to hold lists of data and have them readable while changing a data list
    primarykey
    data
    text
    <p>I have a class <code>Data</code> and for a fixed amount of days i want to save some lists of <code>Data</code> objects.</p> <p>I can do it like that: <code>List&lt;List&lt;Data&gt;&gt;</code> or <code>List&lt;Data&gt;[amount]</code> or <code>Dictionary&lt;DateTime, List&lt;Data&gt;&gt;</code> or whatever i want.</p> <p>For example i have data from 1.1.2000 to 4.1.2000.</p> <p>I want now move it to: 2.1.2000 to 5.1.2000 (move one day in the future)<br> So i have to delete the first and move and add the new data at the end.</p> <p>I also need the other way: 31.12.1999 to 3.1.2000 (move a day in the past)<br> Now i have to delete the last and move and insert new data at the beginning.</p> <p>My problem: i load the data asynchronous while i read data from that structure. I want, that data reading is possible at (nearly) every time.</p> <p>So. What is the best way? An array is the fastest method when i fill the data. <code>List&lt;List&lt;Data&gt;&gt;</code> is also good and a Dictionary is veeeery slow (in my test first both around 0.5 sec while Dic around 2 sec.).</p> <p>But when i want to move that array, i can't read while i'm not ready moving the data. When i use a List i don't have to touch the middle (only delete first and add at the end; faster?) and with the dictionary i can access all the time?</p> <p>The Data saves around 10.000 datasets and i usualy have around 10 Data elements in a List. And i have around 3-4 days loaded.</p> <p>Edit:</p> <p>The goal is to show parts of the data in a chart with mschart. I read files, load them into my structure (my <code>List&lt;List&lt;Data&gt;&gt;</code> or whatever) and convert the data into <code>Charting.DataPointCollection</code> and let the Chart show it (converting the data directly and hold a <code>DataPointCollection</code> instead of <code>Data</code> didn't seem to go, see my question here: <a href="https://stackoverflow.com/questions/20327721/charting-datapointcollection-how-to-get-a-range">Charting.DataPointCollection how to get a Range?</a>)</p> <p>When i want to get some information about e.g. 2.1.2000 8:00 to 10:00, i search in the structure for my day (i search for the right <code>List&lt;Data&gt;</code>) then i choose the right dataset (search in the <code>List&lt;Data&gt;</code>) and after that i search the right data points in <code>Data</code>.<br> I collect them and apply some algorithms to reduce the data points (e.g. Douglas-Peucker). After that i give the data to the chart.</p> <p>When i only load the data points without the structure, my chart is too slow.</p> <p>To give the user the ability to move forward (without waiting until the data is loaded) i need to preload the data. And thats why i load asynchronous some days more.<br> In this case the user can move and when a neighbor day is needed, i can show the preloaded data and load asynchronous the next needed day.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload