473,413 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Appalling debugging times

Hi all

My app scans a subfolder .\DataImporterPlugins\*.dll for assemblies, loads
them in, finds classes that implement IDataImporter, then creates an
instance of that class and shoves it into a list.

In the menu I can then select an instance and the main form will run the
Execute method of that class. What confuses me though is why the debugger
takes 30 seconds every time I hit F10 to execute the next line of code?
MainForm
=======
if (dataImporter.Prepare())
{
try
{
new Thread(delegate()
{
Thread.Sleep(1000);
dataImporter.Execute(ecoSpace, form);
}).Start();
form.ShowDialog();
}
finally
{
dataImporter.CleanUp();
}
}

DataImporter
=========
public bool Prepare()
{
OpenFileDialog ofd = new OpenFileDialog();
using (ofd)
{
ofd.CheckFileExists = true;
ofd.CheckPathExists = true;
ofd.DefaultExt = "*.xml";
ofd.Filter = "Xml files|*.xml";
ofd.FileName = FileName;
if (ofd.ShowDialog() == DialogResult.OK)
{
FileName = ofd.FileName;
return true;
}
return false;
}
}


public void Execute()
{
**************Breakline on the next line***************
XmlFileStream = new FileStream(FileName, FileMode.Open, FileAccess.Read,
FileShare.Read);
Stream xsdStream =
GetType().Assembly.GetManifestResourceStream("AirS oftware.Velocity.DataImport.Xml.AirfieldData.xsd") ;
XmlReader xsdReader = new XmlTextReader(xsdStream);
XmlSchema xsdSchema = System.Xml.Schema.XmlSchema.Read(xsdReader, null);

XmlReaderSettings readerSettings = new XmlReaderSettings();
readerSettings.ValidationType = ValidationType.Schema;
readerSettings.Schemas.Add(xsdSchema);

readerSettings.ValidationEventHandler += new
ValidationEventHandler(readerSettings_ValidationEv entHandler);

XmlReader = XmlTextReader.Create(XmlFileStream, readerSettings);

try
{
while (XmlReader.Read() && !Abort)
{
Oct 2 '07 #1
1 1092
PS: If I remove the ShowDialog() method call I get acceptible response time.
Why would showing this form make any difference?
Thanks

Pete
Oct 2 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Daniel | last post by:
I am using VB.NET and for some reason debugging is not working properly. Sometimes it will work and then other times it will not work at all. I will often times have to Start the program using...
7
by: Mikael Östberg | last post by:
Hello all! I have been working on a project for some time now and yesterday, my debugger stopped working. It is a class library which I run from a Win32 test app, so no IIS involved at this...
6
by: Dmitri Shvetsov | last post by:
Hi All, Did somebody see the situation when the VS refuses to debug the Web Service at all? I can't catch why, the initially created Web Service can be debugged very easy but after some changes...
3
by: R Millman | last post by:
under ASP.NET, single stepping in debug mode appears not to stop within event procedures. i.e. 1) Create web page with submit button and event procedure for the click event in the code behind...
2
by: Jerry Camel | last post by:
I've read every post and KB article, etc that I can find. I thought I was having permissions issues in regards to getting remote debugging to work, but I worked through all of that and now I keep...
1
by: Brian Shannon | last post by:
When I compile my program using the IDE it sometimes compiles and opens in the browser in 5 seconds and other times it takes minutes and sometimes it wont even open it just hangs. Is there a...
2
by: Alex Clark | last post by:
Hi All, My system: WinXP Pro, VS.NET 2003, SQL Server Personal Edition. I'm having problems with my old favourite demon, SQL Debugging from within VS.NET. I have to say I've found this...
4
by: Martin Odhelius | last post by:
Hello, I have a very fustrating problems while debugging ASP.NET applications. When I am debugging and stepping thru code (with F10 or F11) Visual Studio some times suddenly just stop responding...
5
by: rn5a | last post by:
Can someone please suggest me a text editor especially for DEBUGGING ASP scripts apart from Microsoft Visual Interdev? I tried using Visual Interdev & created a project but Interdev generates...
6
by: Jeff | last post by:
I understand there's socket / recursive calls here, but this is a C question, really it is: Here's the code block in question: #if defined(__GLIBC__) { struct hostent hent; char hbf;...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.