I am having performance problem when truing to fill typed list. Below is my simplified code:

```
         public static List<Product> GetProducts()
         {
         List<Product> products = new List<Product>();            
         using (DbQuery query = new DbQuery()) //this is database access class
         {

            query.CommandText = "SELECT ProdID, ProdName,Price FROM SomeTable " ;+

            using (IDataReader rdr = query.ExecuteReader())
            {
               while (rdr.Read())
               {
                  Product prd = new Product();
                  prd.ProdID = DbQuery.ReadInt ( rdr, "ProdID", -1 );
                  prd.ProdName = DbQuery.ReadString(rdr, "ProdName", "");
                  prd.Price = DbQuery.ReadDouble(rdr, "Price", 0);
                  products.Add(prd);
               }
            }
         }
         } 

```

I also have simple struct Product (ProdID, ProdName,Price).

my problem is that it takes 4 seconds to execute GetProducts(). The query returns about 600 records and it takes miliseconds to return result, so I am perrty sure that filling up products collection takes all this time. Am I doing something inefficient here? Please, help.
Thanks,
Gerda
['https://Stackoverflow.com/questions/1569238', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/190204/']
Have you tried to put an index on the fields you're filtering on? This will definitely speed up your queries versus not having indices.
I would be surprised if that is your bottleneck. I would try making a little test app that has a mock database connection. 

You can usually do a little bit better if you can pre-size the list. If there is a reasonable minimum size for the query, or if you have some other way of knowing (or reasonably guessing) a good initial size you might get a tiny boost.