Click here to Skip to main content
15,891,708 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello,
ive followed the book about writing linq (Essential Linq)
i have a server that holds my APP and another server holding my DB
ive used linq dbml with general stored procedure (Select * from Table) and ive used code to get specific rows:

using (articlesDataContext n = new articlesDataContext())
        {
            n.ObjectTrackingEnabled = false;
            vboxLanguage lang = new vboxLanguage(langs);
            if (lang.active)
            {
                var obj = n.udp_vArticle_lst().Where(p => p.module_id == Moduleid).ToList();
                foreach (udp_vArticle_lstResult thisarticle in obj)
                {
                    if (thisarticle.langid == lang.id)
                    {
                        this.loadContent = thisarticle.articleContent;
                        this.loadName = thisarticle.name;
                        break;
                    }
                    else this.loadContent = "Content Not Available in this Language";
                }
            }
            else this.loadContent = "Content Not Available in this Language";
        }


ive done this for all my methods. However a single request increases the NIC to 100% and stays there for a few seconds, making the page load longer (15 second load time).

if i move the database locally to the application server (both DB and APP in a single server) everything loads fast (2 second load)

an help is appreciated or a reference source you can point me to.

thank you in advance
Aresh
Posted
Comments
JV9999 22-Jun-11 8:32am    
Your NIC loads to 100%? So what you actually mean is that your network is slow? If that's the case you are most likely to have either a broken network card or a problem in your network which cause these slowdowns instead of a software problem.
saharkiz 23-Jun-11 1:22am    
thanks for the reply

however using ADO.NET does not produce this problem. both servers are in the same network. if i remove the linq, the NIC wont hit 100%, the only time the NIC hits 100% is when i use LINQ and request for a page to load. so most likely its a software problem.
still ive upgraded the network card software also.

any other ideas on this would help alot.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900