473,405 Members | 2,160 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,405 software developers and data experts.

Create instance takes long time???

Dear all,

I have a simple class in my application whcih create
dynamically textbox control to be place on a form

When I execute the code :

log(time)
my control = new myclass()
log (time)
it take more than 3 secondes to execute, even if I have
just a simple line in myclass contructor.

I have notice that If I compile my project in release mode
it execute withinh 500ms but in debug mode more than 4
seconds.

Should I pay attention of this timimg in debug mode, I
mean how to dig out what is wrong ?

regards
serge
Jul 21 '05 #1
2 1641
serge calderara <se*************@maillefer.net> wrote:
I have a simple class in my application whcih create
dynamically textbox control to be place on a form

When I execute the code :

log(time)
my control = new myclass()
log (time)
it take more than 3 secondes to execute, even if I have
just a simple line in myclass contructor.

I have notice that If I compile my project in release mode
it execute withinh 500ms but in debug mode more than 4
seconds.

Should I pay attention of this timimg in debug mode, I
mean how to dig out what is wrong ?


It's almost certainly just loading resources (which may be loaded by
the base classes of your control, not your control itself), JIT-
compiling code, etc.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #2
Debug mode slows down execution - my experience. The rate of slowdown
depends on components in use in debugged application. E.g. my application
usually executes around 2 times slower when debugged. You can safely ignore
it.

If you are really concerned about execution time - use profiler and release
configuration.

HTH
Alex

"serge calderara" <se*************@maillefer.net> wrote in message
news:01****************************@phx.gbl...
Dear all,

I have a simple class in my application whcih create
dynamically textbox control to be place on a form

When I execute the code :

log(time)
my control = new myclass()
log (time)
it take more than 3 secondes to execute, even if I have
just a simple line in myclass contructor.

I have notice that If I compile my project in release mode
it execute withinh 500ms but in debug mode more than 4
seconds.

Should I pay attention of this timimg in debug mode, I
mean how to dig out what is wrong ?

regards
serge

Jul 21 '05 #3

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

Similar topics

2
by: Markus Prediger | last post by:
Hi NG, I have an asp.net project that uses an vb6 com object for some database-manipulation (I cannot rewrite it in .net, sorry, its not my decision). I want it to be instanciated seperately...
2
by: serge calderara | last post by:
Dear all, I have a simple class in my application whcih create dynamically textbox control to be place on a form When I execute the code : log(time) my control = new myclass() log (time)
4
by: jesper_lofgren | last post by:
Hi there, I have some webcontrols that i want to add dynamically on a page. I have stored the path / namespace in database (ex MyNameSpace.WebControls.Control1) to the class/webcontrol. Lets...
20
by: Shawnk | last post by:
I would like to get the class INSTANCE name (not type name) of an 'object'. I can get the object (l_obj_ref.GetType()) and then get the (l_obj_typ.Name) for the class name. I there any way of...
2
by: Angel Of Death | last post by:
I have a method. It takes some XML as a parameter. Depending on the content of the XML it should create a specific object and call a KNOWN method. So: public void PersistXml(string XmlData){} ...
4
by: jay | last post by:
Greetings ASP.NET 2.0 I'm developing a webcontrol. The class will ultimately end up in a webcontrols DLL, but for development purposes, I want to put the class in a code-behind. This is so...
23
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
4
by: illegal.prime | last post by:
Hi all, I'm getting unexpected results when trying to preload assemblies into an AppDomain I'm creating. Upon creation of the AppDomain - I attach an AssemblyResolve to both my current AppDomain...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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...

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.