Hi,Armeen,
thanks for your reply.
I have visited the site you provided,the performance is very good!
but my test code as below(referenced the .net datastore sample code from github):
Console.WriteLine("Please input enter!");
Console.ReadKey();
{
Stopwatch st = new Stopwatch();
st.Start();
for (int i = 0; i < 1000; i++)
{
DataStore<appfunc> ds = new DataStore<appfunc>();
//lst.Add(ds);
}
st.Stop();
Console.WriteLine("new datastore:" + st.Elapsed.TotalMilliseconds);
}
appfunc is a POCO Model class has six compute columns and about 10 common columns
//-----------------------------------------
//computes
[DwCompute(@"disabled+1+flagdelete+1+sortid+1")]
public int? total { get; set; }
[DwCompute(@"disabled+1+flagdelete+1+sortid+1")]
public int? total1 { get; set; }
[DwCompute(@"disabled+1+flagdelete+1+sortid+1")]
public int? total2 { get; set; }
[DwCompute(@"disabled+1+flagdelete+1+sortid+1")]
public int? total3 { get; set; }
[DwCompute(@"disabled+1+flagdelete+1+sortid+1")]
public int? total4 { get; set; }
[DwCompute(@"disabled+1+flagdelete+1+sortid+1")]
public int? total5 { get; set; }
1000 times new cost about 10 seconds
but only once create datastore instance,cost about 357 ms
the performance seems not so good.
after remove compute columns,once create datastore instance,cost about 159 ms
Why?
Is there any best practice sample code for developer?
thanks!
Best regards,
Sanping