Slow showing / drawing dialogue with ListBox?

后端 未结 3 1483
执念已碎
执念已碎 2021-01-27 16:09

My application uses entity framework to pull in a small tiny set of results... It takes about 3 seconds for it to do it? Why might this be?

Start.cs

3条回答
  •  忘了有多久
    2021-01-27 16:36

    Changing my IEnumerable to IList made a difference:

    public static class PreLoadedResources
    {
        public static IEnumerable projectTypes;
    }
    

    to

    public static class PreLoadedResources
    {
        public static IList projectTypes;
    }
    

    then in my loading (which takes a 2 second hit), I just .ToList it instead... but now the showdialogue procedure takes split seconds.

提交回复
热议问题