C# performance & access

R

ryanbreakspear

Hi guys,

I've written an application which does an xsl transformation (into a
memory stream) to generate a load of sql insert statements. I then
loop through this, and execute the sql (into Access). (I'm using .Net
v1.1)

The transformation is quite slow, but I'm not too bothered about that
(I've read it'll be much faster in .Net V2.0). When the application is
doing the insert statements, it uses 100% of the cpu (as expected), and
inserts about 200 records/second. If I open Microsoft Access, it grabs
all the cpu time (as Access does), but when I close it, the system idle
process has all the CPU time rather than my C# app. Has anyone else
seen anything similar, is there anything I can do to grab all the
resource back for my application? After I've closed Access, my
application runs much, much slower.

I've looked at setting the priority of my process to "High" in c#, but
doing this manually in Task Manager doesn't seem to make any
difference.

Any ideas would be much appreciated.

Thanks in advance

Ryan
 
R

ryanbreakspear

I probably should have said that this only seems to happen if I open
the same database in Access which I'm also inserting into from C#.

Ryan
 
M

Marc Gravell

First - I can't comment on the Access side - not my thing - and this is
probably the main part of your post.

However : xslt. Yes it can be quicker in 2.0, but it isn't a magic bullet.
If your transform is running slowly it is probably due to a non-optimal
design rather than the raw engine speed. Common foobars:
* not using xsl-indexing (and Munchean grouping in particular)
* [ab]use of //SomeNode (the // being the issue)
* [ab]use of open axes such as descendant::, preceding:: or following::

Marc
 
R

ryanbreakspear

Ok, thanks for the advice. I'm fairly new to xsl, so I'm sure there
are loads of things I'm not doing properly! When I've got a bit more
time I'll do some reading about it, and try and speed things up.

You are correct, the real issue at the moment is with Access.

Thanks

Ryan
 

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

Similar Threads


Top