What are possible reasons for memory consumption going up on stack that isn't doing much?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

What are possible reasons for memory consumption going up on stack that isn't doing much?

Curry Kenworthy via use-livecode
Hi folks,

I have a stack that has 2 or 3 self perpetuating messages which do a few
checks and the like....they run every 250 milliseconds or so.

There is no input data into the program unless I specifically send it there.

but while my program is sitting there ....repeating its loops and checks
for incoming input ...... the memory consumption is steadily going up by .1
megabytes at a time.

I have watched my global variables , there is nothing being added to them
and most handlers have local variables that clear out when the handler
finishes.

This happens in IDE and standalone.

This app is made to stay in memory so this is not acceptable, because after
2 days it will get up to 2gb or whatever....so i cannot let this remain.

maybe if i let it sit there it will eventually clear out ..but i haven't
seen that happen yet.

I just don't know where to look.  maybe i just found a memory leak
....Thanks for any input
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: What are possible reasons for memory consumption going up on stack that isn't doing much?

Curry Kenworthy via use-livecode
So i've been watching this running standalone a while .... and it seems to
have stopped for now...I'm going to keep it running and see how high up it
gets.

Its like the engine is caching system events or something .... I'll post
again in a few hours to see if its gotten any higher than this.....

On Sat, Jul 7, 2018 at 7:15 PM, Tom Glod <[hidden email]> wrote:

> Hi folks,
>
> I have a stack that has 2 or 3 self perpetuating messages which do a few
> checks and the like....they run every 250 milliseconds or so.
>
> There is no input data into the program unless I specifically send it
> there.
>
> but while my program is sitting there ....repeating its loops and checks
> for incoming input ...... the memory consumption is steadily going up by .1
> megabytes at a time.
>
> I have watched my global variables , there is nothing being added to them
> and most handlers have local variables that clear out when the handler
> finishes.
>
> This happens in IDE and standalone.
>
> This app is made to stay in memory so this is not acceptable, because
> after 2 days it will get up to 2gb or whatever....so i cannot let this
> remain.
>
> maybe if i let it sit there it will eventually clear out ..but i haven't
> seen that happen yet.
>
> I just don't know where to look.  maybe i just found a memory leak
> ....Thanks for any input
>
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: What are possible reasons for memory consumption going up on stack that isn't doing much?

Curry Kenworthy via use-livecode
Is it possible that multiple overlapping messages are being spawned?

You mention that the checks happen every 250ms... are you doing a send in time at the end of the check or at the start?

Thanks,
Brian
On Jul 7, 2018, 7:21 PM -0400, Tom Glod via use-livecode <[hidden email]>, wrote:

> So i've been watching this running standalone a while .... and it seems to
> have stopped for now...I'm going to keep it running and see how high up it
> gets.
>
> Its like the engine is caching system events or something .... I'll post
> again in a few hours to see if its gotten any higher than this.....
>
> On Sat, Jul 7, 2018 at 7:15 PM, Tom Glod <[hidden email]> wrote:
>
> > Hi folks,
> >
> > I have a stack that has 2 or 3 self perpetuating messages which do a few
> > checks and the like....they run every 250 milliseconds or so.
> >
> > There is no input data into the program unless I specifically send it
> > there.
> >
> > but while my program is sitting there ....repeating its loops and checks
> > for incoming input ...... the memory consumption is steadily going up by .1
> > megabytes at a time.
> >
> > I have watched my global variables , there is nothing being added to them
> > and most handlers have local variables that clear out when the handler
> > finishes.
> >
> > This happens in IDE and standalone.
> >
> > This app is made to stay in memory so this is not acceptable, because
> > after 2 days it will get up to 2gb or whatever....so i cannot let this
> > remain.
> >
> > maybe if i let it sit there it will eventually clear out ..but i haven't
> > seen that happen yet.
> >
> > I just don't know where to look. maybe i just found a memory leak
> > ....Thanks for any input
> >
> >
> >
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: What are possible reasons for memory consumption going up on stack that isn't doing much?

Curry Kenworthy via use-livecode
In reply to this post by Curry Kenworthy via use-livecode
It may help to put a wait x milliseconds with messages in the repeat loop. This will give the engine a chance to do housecleaning.

Bob S


> On Jul 7, 2018, at 16:15 , Tom Glod via use-livecode <[hidden email]> wrote:
>
> Hi folks,
>
> I have a stack that has 2 or 3 self perpetuating messages which do a few
> checks and the like....they run every 250 milliseconds or so.
>
> There is no input data into the program unless I specifically send it there.
>
> but while my program is sitting there ....repeating its loops and checks
> for incoming input ...... the memory consumption is steadily going up by .1
> megabytes at a time.
>
> I have watched my global variables , there is nothing being added to them
> and most handlers have local variables that clear out when the handler
> finishes.
>
> This happens in IDE and standalone.
>
> This app is made to stay in memory so this is not acceptable, because after
> 2 days it will get up to 2gb or whatever....so i cannot let this remain.
>
> maybe if i let it sit there it will eventually clear out ..but i haven't
> seen that happen yet.
>
> I just don't know where to look.  maybe i just found a memory leak
> ....Thanks for any input
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: What are possible reasons for memory consumption going up on stack that isn't doing much?

Curry Kenworthy via use-livecode
Hey Bob....I rarely do anything without waiting 0 milliseconds. :P

On Mon, Jul 9, 2018 at 11:04 AM, Bob Sneidar via use-livecode <
[hidden email]> wrote:

> It may help to put a wait x milliseconds with messages in the repeat loop.
> This will give the engine a chance to do housecleaning.
>
> Bob S
>
>
> > On Jul 7, 2018, at 16:15 , Tom Glod via use-livecode <
> [hidden email]> wrote:
> >
> > Hi folks,
> >
> > I have a stack that has 2 or 3 self perpetuating messages which do a few
> > checks and the like....they run every 250 milliseconds or so.
> >
> > There is no input data into the program unless I specifically send it
> there.
> >
> > but while my program is sitting there ....repeating its loops and checks
> > for incoming input ...... the memory consumption is steadily going up by
> .1
> > megabytes at a time.
> >
> > I have watched my global variables , there is nothing being added to them
> > and most handlers have local variables that clear out when the handler
> > finishes.
> >
> > This happens in IDE and standalone.
> >
> > This app is made to stay in memory so this is not acceptable, because
> after
> > 2 days it will get up to 2gb or whatever....so i cannot let this remain.
> >
> > maybe if i let it sit there it will eventually clear out ..but i haven't
> > seen that happen yet.
> >
> > I just don't know where to look.  maybe i just found a memory leak
> > ....Thanks for any input
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: What are possible reasons for memory consumption going up on stack that isn't doing much?

Curry Kenworthy via use-livecode
:-)


> On Jul 9, 2018, at 08:30 , Tom Glod via use-livecode <[hidden email]> wrote:
>
> Hey Bob....I rarely do anything without waiting 0 milliseconds. :P


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: What are possible reasons for memory consumption going up on stack that isn't doing much?

Curry Kenworthy via use-livecode
update on this .... the memory consumption is definately to do with one of
the messages that checks for changes in the clipboard every 333
milliseconds...... but does not retain what it finds.

there is nothing else going on the computer and as far as i know the
clipboard ISN't changing....does the system make changes to the clipboard
even if ctrl c is not used? ..

.I use the "fullclipboard" data function to identify a change by comparing
it to the last known array from the fullcllipboarddata

is there a faster way of detecting a change in clipboard??????, but have
full data when i do detect it?

the fullclipboard data has been  a little buggy.....and i have some bug
reports to make..... but its probably partly me doing it me doing it
wrong.

On Mon, Jul 9, 2018 at 11:57 AM, Bob Sneidar via use-livecode <
[hidden email]> wrote:

> :-)
>
>
> > On Jul 9, 2018, at 08:30 , Tom Glod via use-livecode <
> [hidden email]> wrote:
> >
> > Hey Bob....I rarely do anything without waiting 0 milliseconds. :P
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: What are possible reasons for memory consumption going up on stack that isn't doing much?

Curry Kenworthy via use-livecode
Pulling the fullclipboarddata could end up doing a bit of work depending on what is on it. You would probably be better off using the rawclipboarddata to avoid LC doing any processing just so you can detect changes.

Under normal circumstances, the various flavors of content will reflect the same thing. If concerned with style changes, then html may be the best one to check. If you are not, then a plain text variant would be simpler (I.e. shorter) to check.
On Jul 9, 2018, 2:47 PM -0500, Tom Glod via use-livecode , wrote:

> update on this .... the memory consumption is definately to do with one of
> the messages that checks for changes in the clipboard every 333
> milliseconds...... but does not retain what it finds.
>
> there is nothing else going on the computer and as far as i know the
> clipboard ISN't changing....does the system make changes to the clipboard
> even if ctrl c is not used? ..
>
> .I use the "fullclipboard" data function to identify a change by comparing
> it to the last known array from the fullcllipboarddata
>
> is there a faster way of detecting a change in clipboard??????, but have
> full data when i do detect it?
>
> the fullclipboard data has been a little buggy.....and i have some bug
> reports to make..... but its probably partly me doing it me doing it
> wrong.
>
> On Mon, Jul 9, 2018 at 11:57 AM, Bob Sneidar via use-livecode <
> [hidden email]> wrote:
>
> > :-)
> >
> >
> > > On Jul 9, 2018, at 08:30 , Tom Glod via use-livecode <
> > [hidden email]> wrote:
> > >
> > > Hey Bob....I rarely do anything without waiting 0 milliseconds. :P
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode