Still Wondering - Resources Used 
Author Message
 Still Wondering - Resources Used

In a previous post I asked about resources used when using a form to hold a
component that would be called from several other forms and how that choice
affects resources vs other methods.
I got an answer on how to do the interface.  Something I knew how to do.

But no answer on how to determine resources used.
In general, if I am implementing something I would like to know more about
how it fits in memory.
I have several application that use large amounts of memory, I think.
Yes, I know about virtual memory supported by disk.
How do I determine the application memory usage?



Mon, 13 Jun 2011 11:05:01 GMT  
 Still Wondering - Resources Used
Are you asking how to "roll your own" as it were?  I wrote an AxDLL that I
call SupportServer.  It also handles error handling.  So when an erro comes
up, the component loads with every conceivable piece of data about the
computer you would want to know.  Plus you can modify which runtime files
you want the DLL to compile and show via a Module.  I page opens with all
this ifo compiled and the user sends it to me, and that is how I get error
reports with all the system info...because trying to get that info from end
users can be difficult at best.

During an error trap, it compiles everything behind the scenes and send it,
Optionally, the end user can open it from the program menu and from within
the program if this wish to view their starts.

This is why I wrote my own and stuffed it into an AxDLL,  Used anywhere by
any program that supports it.  It's one of my favourite little contraptions
because it makes life easier...and not to toot my own horn...it looks damned
good.  :-)

ALL VB6 code with API, no extra dependancies besides that of the VB runtime.

- Kev

- Kev


| In a previous post I asked about resources used when using a form to hold
a
| component that would be called from several other forms and how that
choice
| affects resources vs other methods.
| I got an answer on how to do the interface.  Something I knew how to do.
|
| But no answer on how to determine resources used.
| In general, if I am implementing something I would like to know more about
| how it fits in memory.
| I have several application that use large amounts of memory, I think.
| Yes, I know about virtual memory supported by disk.
| How do I determine the application memory usage?
|
|



Mon, 13 Jun 2011 14:49:27 GMT  
 Still Wondering - Resources Used
  Wouldn't it have made more sense to continue that
thread instead of asking the same question all over again.
Larry Serflaten recommended using a single form and Karl
pointed out that you probably don't even need the control
to begin with. Those are two good pointers to how to keep
resources at a minimum. Personally I think I'd put it on a
form and then keep that loaded, but my reason is more
"superstition" than expertise. It just seems like a lot of trouble
and a lot of resources to repeatedly be loading and unloading
a form that probably doesn't take a lot of space, anyway.

   As for total resources, I sometimes find it interesting to
check Norton System Info, which I happen to have installed,
for memory use. I don't know of any more professional, low-level
monitor. In my experience, resource measuring in general is
undependable. For instance, on Win98 I have code to check
CPU usage. It used to report believable numbers, but when I
have the CPU cooler running for my Athlon CPU it always reports
100%.  ... But maybe someone else can name a good resource
monitor.

   You might also try experimenting with the Win32_Process object
in WMI. That has a number of properties that may be informative.
I haven't tried it so I don't know whether they actually work or not.
(Much of what's in WMI is wishful thinking and/or only works on
some hardware and/or only works on hardware that doesn't exist
yet.)

  I think, if I remember correctly, a class takes 92 bytes. So that
kind of thing is not a big deal. But I imagine that the main reason
you don't see much info. about resource usage in VB is because VB
was designed for convenience and speed of production rather than
leanness. Most VB people think nothing of dropping a dozen controls
into a project, with no thought to the potential resource drag. The
cost is not apparent. (It's counterintuitive to recognize that several
pages of code to produce an owner-drawn button is leaner than
loading a custom button control, for example.)

  And that focus on convenience over efficiency has only become
more extreme, to the point that .Net software loads unthinkable
gobs into memory:
http://blogs.technet.com/markrussinovich/archive/2005/04/16/the-comin...
orld-i-m-scared.aspx

    And Vista's so bloated it can't even run on small notebooks.
(The current requirement of 1+GB RAM for newer MS products
is a gift to the RAM companies but really it's a scandalous waste
of money. I run Win98 and XP, both, on 256 MB RAM easily.)

  So if your software is running on Vista, along with a couple of
.Net programs, saving a MB of RAM here or there would be like
repacking a box in a warehouse so that it can hold a bit more.
It has no real affect on the storage space in the warehouse.

   Despite all of that, though, I'm with you. I like to try to
write everything free of extra dependencies and as compact
as possible. The big usage will be in support libraries, like the
runtime and any system DLLs used by your program. (Plus whatever
dependencies they have.) You can check those with the Depends
program.

Quote:
> In a previous post I asked about resources used when using a form to hold
a
> component that would be called from several other forms and how that
choice
> affects resources vs other methods.
> I got an answer on how to do the interface.  Something I knew how to do.

> But no answer on how to determine resources used.
> In general, if I am implementing something I would like to know more about
> how it fits in memory.
> I have several application that use large amounts of memory, I think.
> Yes, I know about virtual memory supported by disk.
> How do I determine the application memory usage?



Mon, 13 Jun 2011 23:53:59 GMT  
 Still Wondering - Resources Used

For one, once a thread has wilted, people seldom look at it again.
I asked questions that were not even approached.

You on the other hand responded to this thread and since I think I rephrased
my real intention, you did respond.

And, thank very much for the insights.

I guess I need to ask for and look for code that my VB app can run maybe as
an AX.exe to monitor and report memory usage.

Merry Christmas


Quote:
>  Wouldn't it have made more sense to continue that
> thread instead of asking the same question all over again.
> Larry Serflaten recommended using a single form and Karl
> pointed out that you probably don't even need the control
> to begin with. Those are two good pointers to how to keep
> resources at a minimum. Personally I think I'd put it on a
> form and then keep that loaded, but my reason is more
> "superstition" than expertise. It just seems like a lot of trouble
> and a lot of resources to repeatedly be loading and unloading
> a form that probably doesn't take a lot of space, anyway.

>   As for total resources, I sometimes find it interesting to
> check Norton System Info, which I happen to have installed,
> for memory use. I don't know of any more professional, low-level
> monitor. In my experience, resource measuring in general is
> undependable. For instance, on Win98 I have code to check
> CPU usage. It used to report believable numbers, but when I
> have the CPU cooler running for my Athlon CPU it always reports
> 100%.  ... But maybe someone else can name a good resource
> monitor.

>   You might also try experimenting with the Win32_Process object
> in WMI. That has a number of properties that may be informative.
> I haven't tried it so I don't know whether they actually work or not.
> (Much of what's in WMI is wishful thinking and/or only works on
> some hardware and/or only works on hardware that doesn't exist
> yet.)

>  I think, if I remember correctly, a class takes 92 bytes. So that
> kind of thing is not a big deal. But I imagine that the main reason
> you don't see much info. about resource usage in VB is because VB
> was designed for convenience and speed of production rather than
> leanness. Most VB people think nothing of dropping a dozen controls
> into a project, with no thought to the potential resource drag. The
> cost is not apparent. (It's counterintuitive to recognize that several
> pages of code to produce an owner-drawn button is leaner than
> loading a custom button control, for example.)

>  And that focus on convenience over efficiency has only become
> more extreme, to the point that .Net software loads unthinkable
> gobs into memory:
> http://blogs.technet.com/markrussinovich/archive/2005/04/16/the-comin...
> orld-i-m-scared.aspx

>    And Vista's so bloated it can't even run on small notebooks.
> (The current requirement of 1+GB RAM for newer MS products
> is a gift to the RAM companies but really it's a scandalous waste
> of money. I run Win98 and XP, both, on 256 MB RAM easily.)

>  So if your software is running on Vista, along with a couple of
> .Net programs, saving a MB of RAM here or there would be like
> repacking a box in a warehouse so that it can hold a bit more.
> It has no real affect on the storage space in the warehouse.

>   Despite all of that, though, I'm with you. I like to try to
> write everything free of extra dependencies and as compact
> as possible. The big usage will be in support libraries, like the
> runtime and any system DLLs used by your program. (Plus whatever
> dependencies they have.) You can check those with the Depends
> program.

>> In a previous post I asked about resources used when using a form to hold
> a
>> component that would be called from several other forms and how that
> choice
>> affects resources vs other methods.
>> I got an answer on how to do the interface.  Something I knew how to do.

>> But no answer on how to determine resources used.
>> In general, if I am implementing something I would like to know more
>> about
>> how it fits in memory.
>> I have several application that use large amounts of memory, I think.
>> Yes, I know about virtual memory supported by disk.
>> How do I determine the application memory usage?



Tue, 14 Jun 2011 00:52:15 GMT  
 Still Wondering - Resources Used
Is this something that you want to check for your own knowledge>
If so, download and run Process Explorer: http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
and modify the columns to display Virtual Size
and then run your app.

--

Steve Easton

Quote:

> For one, once a thread has wilted, people seldom look at it again.
> I asked questions that were not even approached.

> You on the other hand responded to this thread and since I think I rephrased my real intention, you did
> respond.

> And, thank very much for the insights.

> I guess I need to ask for and look for code that my VB app can run maybe as an AX.exe to monitor and report
> memory usage.

> Merry Christmas


>>  Wouldn't it have made more sense to continue that
>> thread instead of asking the same question all over again.
>> Larry Serflaten recommended using a single form and Karl
>> pointed out that you probably don't even need the control
>> to begin with. Those are two good pointers to how to keep
>> resources at a minimum. Personally I think I'd put it on a
>> form and then keep that loaded, but my reason is more
>> "superstition" than expertise. It just seems like a lot of trouble
>> and a lot of resources to repeatedly be loading and unloading
>> a form that probably doesn't take a lot of space, anyway.

>>   As for total resources, I sometimes find it interesting to
>> check Norton System Info, which I happen to have installed,
>> for memory use. I don't know of any more professional, low-level
>> monitor. In my experience, resource measuring in general is
>> undependable. For instance, on Win98 I have code to check
>> CPU usage. It used to report believable numbers, but when I
>> have the CPU cooler running for my Athlon CPU it always reports
>> 100%.  ... But maybe someone else can name a good resource
>> monitor.

>>   You might also try experimenting with the Win32_Process object
>> in WMI. That has a number of properties that may be informative.
>> I haven't tried it so I don't know whether they actually work or not.
>> (Much of what's in WMI is wishful thinking and/or only works on
>> some hardware and/or only works on hardware that doesn't exist
>> yet.)

>>  I think, if I remember correctly, a class takes 92 bytes. So that
>> kind of thing is not a big deal. But I imagine that the main reason
>> you don't see much info. about resource usage in VB is because VB
>> was designed for convenience and speed of production rather than
>> leanness. Most VB people think nothing of dropping a dozen controls
>> into a project, with no thought to the potential resource drag. The
>> cost is not apparent. (It's counterintuitive to recognize that several
>> pages of code to produce an owner-drawn button is leaner than
>> loading a custom button control, for example.)

>>  And that focus on convenience over efficiency has only become
>> more extreme, to the point that .Net software loads unthinkable
>> gobs into memory:
>> http://blogs.technet.com/markrussinovich/archive/2005/04/16/the-comin...
>> orld-i-m-scared.aspx

>>    And Vista's so bloated it can't even run on small notebooks.
>> (The current requirement of 1+GB RAM for newer MS products
>> is a gift to the RAM companies but really it's a scandalous waste
>> of money. I run Win98 and XP, both, on 256 MB RAM easily.)

>>  So if your software is running on Vista, along with a couple of
>> .Net programs, saving a MB of RAM here or there would be like
>> repacking a box in a warehouse so that it can hold a bit more.
>> It has no real affect on the storage space in the warehouse.

>>   Despite all of that, though, I'm with you. I like to try to
>> write everything free of extra dependencies and as compact
>> as possible. The big usage will be in support libraries, like the
>> runtime and any system DLLs used by your program. (Plus whatever
>> dependencies they have.) You can check those with the Depends
>> program.

>>> In a previous post I asked about resources used when using a form to hold
>> a
>>> component that would be called from several other forms and how that
>> choice
>>> affects resources vs other methods.
>>> I got an answer on how to do the interface.  Something I knew how to do.

>>> But no answer on how to determine resources used.
>>> In general, if I am implementing something I would like to know more about
>>> how it fits in memory.
>>> I have several application that use large amounts of memory, I think.
>>> Yes, I know about virtual memory supported by disk.
>>> How do I determine the application memory usage?



Wed, 15 Jun 2011 07:38:03 GMT  
 Still Wondering - Resources Used
Check this post:

http://groups.google.ie/group/microsoft.public.vb.general.discussion/...



Wed, 15 Jun 2011 09:42:01 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. adding resources to the resource sheet in ms project using vba

2. Looking for tool to make AVI files from JPG stills

3. Creating time-lapse AVI movie from SNAPPY stills?

4. create fog on a stills picture

5. Pulling PC Cam stills with an API

6. Minor Anoyance - just wondered if there was a cure

7. I am editing a premade .dot and wonder how to set date where I want it

8. Wondering about DataSets

9. Just wonder, Develop Help files?

10. wondering:VB6 compatible arrays in structures

11. I am learning VB.NET and am wondering....

12. Wondering about IExtender

 

 
Powered by phpBB® Forum Software