Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default Limits to using Call

Greetings:
I have a new module, consisting of many "subs"
Each one is actually quite small, but very understandable, since each one
refers to one sheet.
Question:
Does the use of many subs (Calls) noticibly affect spead of proceedures?
Is there any limit to the number of subs one can use within a module or
workbook or............

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Limits to using Call

It takes longer to call a sub to execute some code than it does to execute it
inline.

that said, it is not a significant performance problem and the benefits
probably outweigh the penalties.

The only limitation I am aware of is that if you exported a module to a bas
file, the size of the bas file should be less than 64K. This isn't a
published limitation, but many have stated it as a rule of thumb which if
ignored can cause problems.

That really has no effect on the number of procedures which I am not aware
of any limit.

At the same time, from a maintenance standpoint, I suppose you can go
overboard.

--
Regards,
Tom Ogilvy


"BEEJAY" wrote:

Greetings:
I have a new module, consisting of many "subs"
Each one is actually quite small, but very understandable, since each one
refers to one sheet.
Question:
Does the use of many subs (Calls) noticibly affect spead of proceedures?
Is there any limit to the number of subs one can use within a module or
workbook or............

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Limits to using Call

To further what Tom has said, where you have a real need for speed
(performance is noticably poor) then keep function or procedure calls out of
large loops (a few thousand loops or more). There is overhead associated with
every call so if it is in a loop it can become significant. If it is just
regular sequential code then there really is no benefit to 'in lining" your
subs or functions, and maintenance will often be easier if you break your
code up into multiple subs or functions.
--
HTH...

Jim Thomlinson


"Tom Ogilvy" wrote:

It takes longer to call a sub to execute some code than it does to execute it
inline.

that said, it is not a significant performance problem and the benefits
probably outweigh the penalties.

The only limitation I am aware of is that if you exported a module to a bas
file, the size of the bas file should be less than 64K. This isn't a
published limitation, but many have stated it as a rule of thumb which if
ignored can cause problems.

That really has no effect on the number of procedures which I am not aware
of any limit.

At the same time, from a maintenance standpoint, I suppose you can go
overboard.

--
Regards,
Tom Ogilvy


"BEEJAY" wrote:

Greetings:
I have a new module, consisting of many "subs"
Each one is actually quite small, but very understandable, since each one
refers to one sheet.
Question:
Does the use of many subs (Calls) noticibly affect spead of proceedures?
Is there any limit to the number of subs one can use within a module or
workbook or............

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default Limits to using Call

Tom and Jim:
Thank You: Gives me quite some peace of mind

"Jim Thomlinson" wrote:

To further what Tom has said, where you have a real need for speed
(performance is noticably poor) then keep function or procedure calls out of
large loops (a few thousand loops or more). There is overhead associated with
every call so if it is in a loop it can become significant. If it is just
regular sequential code then there really is no benefit to 'in lining" your
subs or functions, and maintenance will often be easier if you break your
code up into multiple subs or functions.
--
HTH...

Jim Thomlinson


"Tom Ogilvy" wrote:

It takes longer to call a sub to execute some code than it does to execute it
inline.

that said, it is not a significant performance problem and the benefits
probably outweigh the penalties.

The only limitation I am aware of is that if you exported a module to a bas
file, the size of the bas file should be less than 64K. This isn't a
published limitation, but many have stated it as a rule of thumb which if
ignored can cause problems.

That really has no effect on the number of procedures which I am not aware
of any limit.

At the same time, from a maintenance standpoint, I suppose you can go
overboard.

--
Regards,
Tom Ogilvy


"BEEJAY" wrote:

Greetings:
I have a new module, consisting of many "subs"
Each one is actually quite small, but very understandable, since each one
refers to one sheet.
Question:
Does the use of many subs (Calls) noticibly affect spead of proceedures?
Is there any limit to the number of subs one can use within a module or
workbook or............

Thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
sum, ave with limits, help pls. Chris Excel Discussion (Misc queries) 6 November 3rd 08 12:53 PM
Sum with limits Chris Excel Discussion (Misc queries) 2 October 28th 08 05:00 PM
Call Center Management: How to calculate 'cost per call' Denniso6 Excel Discussion (Misc queries) 2 June 25th 06 05:01 PM
Row Limits jv Excel Worksheet Functions 1 March 17th 06 04:43 PM
Limits Student Excel Discussion (Misc queries) 1 December 7th 05 03:26 PM


All times are GMT +1. The time now is 06:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"