Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > my method to optimize application startup performance

Reply
Thread Tools

my method to optimize application startup performance

 
 
George2
Guest
Posts: n/a
 
      11-22-2007
Hello everyone,


I found that for an application, if I specify the entry point function
(e.g. main), the performance of startup will be greatly improved.

My questions are,

1. If no entry point is specified, how will debugger of Visual Studio
find the entry point function? Will the time to search entry point
function long?

For example, in my application, I defined the main function like this,

int main(void)

how will debugger treat main as the start point to execute (I set a
break point to this function if I do not specify the entry point, then
after a couple of minutes after pressing F5 to trigger debugger,
debugger will jumps to main)?

If I specify the entry point to main, then debugger will directly
jumps to this function after F5 debugging.

2. Specify entry point is a way to improve performance?


thanks in advance,
George
 
Reply With Quote
 
 
 
 
Stuart Redmann
Guest
Posts: n/a
 
      11-22-2007
George2 wrote:
> Hello everyone,
>
>
> I found that for an application, if I specify the entry point function
> (e.g. main), the performance of startup will be greatly improved.
>
> My questions are,
>
> 1. If no entry point is specified, how will debugger of Visual Studio
> find the entry point function? Will the time to search entry point
> function long?


This newsgroup is dedicated to the C++ programming language. Your question is
about some particular compiler/debugger, so your are OT in two ways: Your
question is not about the C++ language and it is platform specific. The guys at
microsoft.public.vc.* will probably help you.

[snip]

Regards,
Stuart
 
Reply With Quote
 
 
 
 
Tomás Ó hÉilidhe
Guest
Posts: n/a
 
      11-26-2007
George2:

> Hello everyone,
>
>
> I found that for an application, if I specify the entry point function
> (e.g. main), the performance of startup will be greatly improved.



Presumably because you're skipping a boat load of initialisation routines.


> My questions are,
>
> 1. If no entry point is specified, how will debugger of Visual Studio
> find the entry point function? Will the time to search entry point
> function long?



Is there a default? You should try asking on a Visual Studio group or
forum.


> For example, in my application, I defined the main function like this,
>
> int main(void)
>
> how will debugger treat main as the start point to execute (I set a
> break point to this function if I do not specify the entry point, then
> after a couple of minutes after pressing F5 to trigger debugger,
> debugger will jumps to main)?
>
> If I specify the entry point to main, then debugger will directly jumps
> to this function after F5 debugging.



Haven't a clue, you'd have to ask Visual Studio folk.


> 2. Specify entry point is a way to improve performance?



Be careful which initialisation routines you're skipping! Your program
might crash if you try to call a routine which should have been preceded
by a call to an initialisation routine.

--
Tomás Ó hÉilidhe
 
Reply With Quote
 
Victor Bazarov
Guest
Posts: n/a
 
      11-26-2007
Tomás Ó hÉilidhe wrote:
> George2:
> [..]
>> 2. Specify entry point is a way to improve performance?

>
>
> Be careful which initialisation routines you're skipping! Your program
> might crash if you try to call a routine which should have been
> preceded by a call to an initialisation routine.


[to George2:]

....especially if that initialisation routine is responsible for proper
initialisation of some static objects, like 'std::cout' or 'std::cin'.
Any use of those objects has undefined behaviour if they haven't been
constructed correctly. OK, the library may know how to do the stuff
it itself provides, but what if your program has some statics?...

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do any Java compilers or JVMs optimize getter method calls? david.karr Java 19 09-05-2009 01:07 AM
Glassfish invoke method during application startup news.internetia.pl Java 2 01-12-2008 09:51 AM
Optimize internet performance =?Utf-8?B?YW5nbGVmYW45OQ==?= Wireless Networking 6 06-23-2006 04:08 PM
jni to optimize a java application using native mathematical libraries dimitri.ognibene@gmail.com Java 16 04-06-2006 10:01 AM
Relationship of "Requests in Application Queue" and ASP.NET application performance / stability Dominic ASP .Net 1 12-14-2004 04:37 AM



Advertisments