Custom-Settings slow load (ApplicationSettingsBase)

299 Views Asked by At

The first load of Custom-Settings takes around 2 seconds every time the application is started.

Is there some way to accelerate it?

(Or is this widely used, as suggested here, despite the speed penalty.)

Here's the code:

public class MySettings : ApplicationSettingsBase
{
    [UserScopedSettingAttribute()]
    public int MyInt
    {
        get { return (int)(this["MyInt"]); }
        set { this["MyInt"] = value; }
    }
}

And called so:

MySettings s = new MySettings();
int i = s.MyInt;
0

There are 0 best solutions below