473,498 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB .net Exception extremely slow

I put this code on a button:

dim x as integer
Try
x = "hello"
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

The application hangs up for over 1 minute, then finally comes back
with "Cast from string "hello" to type 'Integer' is not valid".

The second time I click the button the execption comes up immediately.
But if I exit the application and go back in, again it takes over a
minute to display the exception.

Has anyone else had this problem? I can't seem to find it in the
groups.

Nov 21 '05 #1
5 1326

cr******@gmail.com wrote:
I put this code on a button:

dim x as integer
Try
x = "hello"
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try


How is that code even getting past the compiler? Do you have Option
Strict On? It is normal for there to be some delay when the exception
class is first JIT'd but 1 minute is way too long. I usually notice
about a 5 second delay on the first exception.

Nov 21 '05 #2
I had to take option strict off to do that example - that's just an
example to demonstrate the problem. I've got the same problem with
any exception (e.g. SQL errors).

Nov 21 '05 #3

"Chris Dunaway" <du******@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...

cr******@gmail.com wrote:
I put this code on a button:

dim x as integer
Try
x = "hello"
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try


How is that code even getting past the compiler? Do you have Option
Strict On? It is normal for there to be some delay when the exception
class is first JIT'd but 1 minute is way too long. I usually notice
about a 5 second delay on the first exception.


I would even say that 5 seconds is pushing it (even though it FEELS like 5
seconds)

Nov 21 '05 #4
I just tried your example and (at least on my machine) the longest the
exception took to get thrown was about two seconds. Does it take that long
on other machines?

"cr******@gmail.com" wrote:
I put this code on a button:

dim x as integer
Try
x = "hello"
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

The application hangs up for over 1 minute, then finally comes back
with "Cast from string "hello" to type 'Integer' is not valid".

The second time I click the button the execption comes up immediately.
But if I exit the application and go back in, again it takes over a
minute to display the exception.

Has anyone else had this problem? I can't seem to find it in the
groups.

Nov 21 '05 #5
Hi,

Thanks...

It happens on the 2 machines that we have vb.net ide installed on
here...

It only happens from the IDE, the compiled version returns the
exception immediately... So I can only try it on a machine that has
visual studio .net on it...

Nov 21 '05 #6

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

Similar topics

0
1649
by: smartin | last post by:
python IIS cgi loading extremely slow I recently uninstalled python 1.5.2 and installed python 2.3 on a Windows 2000 server running IIS 5.0. The issue is that when submitting a cgi request to a...
5
3228
by: garydevstore | last post by:
Hi, I have a table defined as CREATE TABLE ( IDENTITY (1, 1) NOT NULL , NULL , NULL , NOT NULL , NULL , (255) COLLATE SQL_Latin1_General_CP1_CS_AS
83
5842
by: D. Dante Lorenso | last post by:
Trying to use the 'search' in the docs section of PostgreSQL.org is extremely SLOW. Considering this is a website for a database and databases are supposed to be good for indexing content, I'd...
8
1939
by: Robert Gravereaux | last post by:
I've noticed that the first exception thrown/caught by an app running in debug is very slow - it takes perhaps 7 or 8 seconds on my P4 machine. I've noticed this on several different machines...
44
4155
by: craig | last post by:
I am wondering if there are some best practices for determining a strategy for using try/catch blocks within an application. My current thoughts are: 1. The code the initiates any high-level...
6
2017
by: DCC-700 | last post by:
I am running VB for ASP.Net in VS.Net 2003 and am experiencing extremely slow response in the ide at times and the debugger. Below is additional detail on the problem. Any thoughts are much...
0
1712
by: Carlo Marchesoni | last post by:
I have an application that has a main.aspx page (something like a todo list). Clicking one of the items open an new window (javascript window.open) with a new aspx page. this is extremely slow....
5
10655
by: coldpizza | last post by:
I am trying to fill a sqlite3 database with records, and to this end I have written a class that creates the db, the table and adds rows to the table. The problem is that the updating process is...
0
7168
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
7210
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...
1
6891
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5465
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,...
1
4916
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
3096
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3087
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1424
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
293
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.