0

I have an app that loads some XML docs into memory then runs various queries against it using Linq.

The app runs fine on the live server (Windows Server 2003) and under Visual Studio 2008 on XP. But on my Vista laptop (4gb RAM, 2GHz CPU) all the Linq queries run really really slow. What should take a couple of milliseconds instead takes a couple of seconds. The funny thing is is that all other parts of the code run smoothly and quickly as they should.

Has anyone else had trouble with this type of thing?

7 Answers 7

1

No, I definitely have not. Take a peek at your System event log. Anything strange going on in there? Look at your CPU. Is something eating up your CPU? Is it what you think it is?

0

I have not had any such issues with VS 2008 and SQL DEV on my desktop and laptop. My machine specs are similar to yours.

0

No problems here, plenty of linq in my dev code base. Running Vista Ultimate (32) on my laptop for developement. Running windows 2003 on my test server.

No issues that I have noticed.

0

Get a profiler like the one built into VS, or the profiler from Red Gate (http://www.red-gate.com/) and find out what's actually happening!

0

I've seen huge crazy-making performance problems under Vista that don't occur under XP - but only when I'm running a debug build under the IDE.

0

I have not seen the kind of performance issues you are reporting. See http://thinqlinq.com/Default/Querying-the-complete-plays-of-Shakespeare-using-LINQ-to-XML.aspx for a sample that queries the complete works of Shakespeare finding the characters with the most number of lines. When spanning 40 XML files each a hundred K in size resulting in a single 5 meg XML document, I'm still seeing sub-second querying time.

You may be running into issues with a complex join or recursive where clause that is causing your performance to degrade.

1
  • Why would the performance be fine on every other machine then?
    – cbp
    Feb 4, 2009 at 2:38
0

How fast is the hard drive in your laptop. You may just be seeing the cost of loading a large xml file from disk.

1
  • I believe that the files should be loaded into memory by the time I am running queries on them. The total size of the XML files are about 150kb and I have 4gb of memory so its not like I should be running out!
    – cbp
    Feb 4, 2009 at 2:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.