DataAdapter Fill method SLOOOOOW

R

Rene

What happened??? I just upgraded one of my 2003 projects to VS 2005 and now,
when I call the Fill method of an OleDbDataAdapter passing a DataTable as a
parameter it takes a heck of a lot longer that it used to.

Before, it used to take 1 second to fill up the DataTable but now it takes
around 24 seconds!! This is a grotesque difference!!

I did NOT change a single line of code. All I did was upgrade to 2005.

This seems like a huge bug and is hard to believe it can be happening so I
guess I must have a corrupted installation or something. Is anyone
experiencing similar problems? I tried it in two computers and I got the
same results.

Any help is appreciated.
 
M

mablejune

What happened??? I just upgraded one of my 2003 projects to VS 2005 and now,
when I call the Fill method of an OleDbDataAdapter passing a DataTable as a
parameter it takes a heck of a lot longer that it used to.

Before, it used to take 1 second to fill up the DataTable but now it takes
around 24 seconds!! This is a grotesque difference!!

I did NOT change a single line of code. All I did was upgrade to 2005.

This seems like a huge bug and is hard to believe it can be happening so I
guess I must have a corrupted installation or something. Is anyone
experiencing similar problems? I tried it in two computers and I got the
same results.

Any help is appreciated.

You may think I'm nuts when I say this, but do you have a vitus
detector turned on the machine?

I've noticed that VS 2005 gets very slow sometimes when the virus
checker on my machine is turned on. When I turn it off things get a
lot faster. It's the McAfee checker
 
R

Rene

No I am certain I don't have a virus. I narrowed everything down to the data
reader reading loop as in:

while(myDataReader.Read())
{
// Read the data here.
}

If I don't read anything inside the loop and simply let the loop go through
the loop is very fast but if I read at least one filed inside the loop
things slow down to a crawl.

If I was to send someone my Access Database and the loop code, would anyone
care to try this to see if you get the same behavior?

Thanks.
 
R

Rene

Update:

Well, I closed the IDE and run the program directly by double clicking on
the compiled exe and things work normal that way. The data loads very fast
this way, controls paint on the screen a lot faster too etc.

Well, as long as it works fine like that I don't mind too much if it sucks
on the IDE. The only thing that I am really sorry about is the 5 hours that
I wasted and worry while troubleshooting these speed problems. I wonder how
many other people will end up waiting all this time too.
 
R

Rene

Shail,

I found the problem, please read one of my own replies posted at 1:25 AM.
The problem only happens when running the code in the IDE, when the code
runs by clicking the program exe everything is fine. I have no idea what's
going on in the VS 2005 IDE but performance is really bad compared with VS
2003.

Thakns.
 
R

Rene

Everything is identical, nothing changed except that the program was
imported to VS 2005, in fact, if I run the exact same code using VS 2003 (I
have both versions installed in the same computer) the VS 2003 works nicely.
Exact same code, exact same database exact same everything.

I also notice that a custom graph that I have runs around 20 times slower in
VS 2005 IDE than the 2003 IDE. Is really quite a difference, almost
unacceptable because testing your code like that will drive you crazy!
 
R

Rene

Well .. all I can say is .. MS would be extremely interested in getting
this feedback so they can fix the issue, but they really need more
information than "It runs slow".

I really doubt this, I am sure they were aware of the problem but since is
only in some "extreme" situation like loading a 7000 record in to a data
table they don't bother to fix it.

There are also plenty of other bugs in this new VS 2005, I had to stop and
start the VS at least 30 times already (in 2 days) because of problems I am
having. There is just no way they don't know about theses bugs, they just
choose to ignore them otherwise the product would never go out for sale.

Maybe all of the issues I am having are because I updated instead of
creating a fresh new project, I really don't know, I just know that we just
have to live with these problems, is been like this since software was
invented and it will probably continue like that for the rest of our lives,
especially if we rely in Microsoft to take action about this.
 
S

Sahil Malik [MVP C#]

Y'know I keep hearing such stuff, but I've been using VStudio 2005
exclusively for the past 14 months with ZERO issues (barring beta issues -
which are fixed now). Except I never meet such a person in person - so I can
look at their machine and figure out whats going on. Anyway, MS does take
action, but put yourself in their shoes - telling them "My IDE hangs" or "My
IDE runs slow" .. gives them no information regards how to fix it. If you
have a reproducible set of steps that can produce a problem, please do put
it on labs.msdn.microsoft.com/productfeedback .

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
__________________________________________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top