Birçok anahtar durumlarda ASPX / PHP sayfa boyutu parformans etkileyebilir

0 Cevap php

Biz sadece sayfa yükleme biz istenen işleve kullanıcıyı yönlendirmek ve bazı değerleri döndürmek için switch case kullanmak REST hizmet olarak tek bir ASPX / PHP dosyası olduğunu varsayalım. Benim soru bu sayfanın fonksiyonları 1000 aşması durumunda olduğunu söylemek, bu darbe olacak performans ve tepki süresi?

Örnek kod böyle bir şey olabilir:

    protected void Page_Load(object sender, EventArgs e) {
    try {
        string ServiceOutput = "";
        string Function = Request.Form["Function"];
        switch (Function) {
            case "GetPluginsInfo":
                ServiceOutput = GetPluginsInfo();
                break;

            case "demo":
                ServiceOutput = Request.Form["Message"];
                break;

                 .
                 .
                 .
                 .

        }
        Response.Write(ServiceOutput);
    }
    catch (Exception Error) {
        Response.Write(Error.Message);
    }
}

0 Cevap