Re: Is there a way to manually trigger GC?
PS > I just remembered why I loaded it ... its to enable fast searching of past text clips. But maybe I can lazy load image clips which are the ones that take up the most amount of ram anyways. On Sun, Jan 17, 2021 at 12:35 PM Tom Glod wrote: > Hi Phil, that function only reports available memory. > > Hi Rick, > > My application, the Time Saver's Toolbox, has a clipboard manager, and > upon loading the app, I load the existing archive of "clips" into memory. > Currently for example, the app is using 37 megabytes of system ram. > You are right, on-demand loading seems to be the only way i can have some > control over memory consumption. > Luckily I had enough foresight to keep a list of clips and their timestamp > without the data, so i can load that instead of the clips. > > Thanks guys ... > > > On Sun, Jan 17, 2021 at 12:20 PM Rick Harrison via use-livecode < > use-livecode@lists.runrev.com> wrote: > >> Hi Tom, >> >> Garbage Collection and releasing memory is not an >> easy problem to solve. It would be better to try to >> figure out why your application is chewing up so >> much memory on load. >> >> Load times can be improved by only loading in >> stuff that you absolutely need to access at the >> moment to display to your user. If you can stall >> loading things until idle you may be able to smooth >> out performance. This is usually things like trying >> to load tons of images all at once for a game etc. >> >> On the plus side, the fact that memory use drops >> down after load to under 100 mb is good. >> >> If you are using a lot of images, are they part of >> the stack or are you trying to load them after the >> program is running? >> >> Lots of things affect performance. Try to think >> of what might be hampering that. >> >> Good luck! >> >> Rick >> >> >> >> > On Jan 16, 2021, at 2:31 PM, Tom Glod via use-livecode < >> use-livecode@lists.runrev.com> wrote: >> > >> > Hi Folks, >> > >> > I'm finding my application does a nice job to unload data from memory, >> but >> > it takes a while for that to happen. When the initial load of the >> > application occurs, the memory consumption is quite high if there is >> lots >> > of data to be loaded (1 GB+). >> > >> > But after a while, the used ram drops down to under 100 mb as the >> > application run in the background, after which the application swaps is >> > only the data I am accessing. >> > >> > Can I trigger that memory release manually? (Maybe its another mechanism >> > and not GC?!) >> > >> > TIA >> > >> > >> > Tom Glod >> > Founder & Developer >> > MakeShyft R.D.A (www.makeshyft.com) >> > Mobile:647.562.9411 >> > ___ >> > use-livecode mailing list >> > use-livecode@lists.runrev.com >> > Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> > http://lists.runrev.com/mailman/listinfo/use-livecode >> >> >> ___ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > > > -- > Tom Glod > Founder & Developer > MakeShyft R.D.A (www.makeshyft.com) > Mobile:647.562.9411 > -- Tom Glod Founder & Developer MakeShyft R.D.A (www.makeshyft.com) Mobile:647.562.9411 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Is there a way to manually trigger GC?
Hi Phil, that function only reports available memory. Hi Rick, My application, the Time Saver's Toolbox, has a clipboard manager, and upon loading the app, I load the existing archive of "clips" into memory. Currently for example, the app is using 37 megabytes of system ram. You are right, on-demand loading seems to be the only way i can have some control over memory consumption. Luckily I had enough foresight to keep a list of clips and their timestamp without the data, so i can load that instead of the clips. Thanks guys ... On Sun, Jan 17, 2021 at 12:20 PM Rick Harrison via use-livecode < use-livecode@lists.runrev.com> wrote: > Hi Tom, > > Garbage Collection and releasing memory is not an > easy problem to solve. It would be better to try to > figure out why your application is chewing up so > much memory on load. > > Load times can be improved by only loading in > stuff that you absolutely need to access at the > moment to display to your user. If you can stall > loading things until idle you may be able to smooth > out performance. This is usually things like trying > to load tons of images all at once for a game etc. > > On the plus side, the fact that memory use drops > down after load to under 100 mb is good. > > If you are using a lot of images, are they part of > the stack or are you trying to load them after the > program is running? > > Lots of things affect performance. Try to think > of what might be hampering that. > > Good luck! > > Rick > > > > > On Jan 16, 2021, at 2:31 PM, Tom Glod via use-livecode < > use-livecode@lists.runrev.com> wrote: > > > > Hi Folks, > > > > I'm finding my application does a nice job to unload data from memory, > but > > it takes a while for that to happen. When the initial load of the > > application occurs, the memory consumption is quite high if there is lots > > of data to be loaded (1 GB+). > > > > But after a while, the used ram drops down to under 100 mb as the > > application run in the background, after which the application swaps is > > only the data I am accessing. > > > > Can I trigger that memory release manually? (Maybe its another mechanism > > and not GC?!) > > > > TIA > > > > > > Tom Glod > > Founder & Developer > > MakeShyft R.D.A (www.makeshyft.com) > > Mobile:647.562.9411 > > ___ > > use-livecode mailing list > > use-livecode@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Tom Glod Founder & Developer MakeShyft R.D.A (www.makeshyft.com) Mobile:647.562.9411 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Is there a way to manually trigger GC?
Hi Tom, Garbage Collection and releasing memory is not an easy problem to solve. It would be better to try to figure out why your application is chewing up so much memory on load. Load times can be improved by only loading in stuff that you absolutely need to access at the moment to display to your user. If you can stall loading things until idle you may be able to smooth out performance. This is usually things like trying to load tons of images all at once for a game etc. On the plus side, the fact that memory use drops down after load to under 100 mb is good. If you are using a lot of images, are they part of the stack or are you trying to load them after the program is running? Lots of things affect performance. Try to think of what might be hampering that. Good luck! Rick > On Jan 16, 2021, at 2:31 PM, Tom Glod via use-livecode > wrote: > > Hi Folks, > > I'm finding my application does a nice job to unload data from memory, but > it takes a while for that to happen. When the initial load of the > application occurs, the memory consumption is quite high if there is lots > of data to be loaded (1 GB+). > > But after a while, the used ram drops down to under 100 mb as the > application run in the background, after which the application swaps is > only the data I am accessing. > > Can I trigger that memory release manually? (Maybe its another mechanism > and not GC?!) > > TIA > > > Tom Glod > Founder & Developer > MakeShyft R.D.A (www.makeshyft.com) > Mobile:647.562.9411 > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Is there a way to manually trigger GC?
Hi Tom, Does hasMemory() have any effect on available memory, or does it truly just report the state of things? I wonder if there is some shell command that might help? Phil Davis On 1/16/21 11:31 AM, Tom Glod via use-livecode wrote: Hi Folks, I'm finding my application does a nice job to unload data from memory, but it takes a while for that to happen. When the initial load of the application occurs, the memory consumption is quite high if there is lots of data to be loaded (1 GB+). But after a while, the used ram drops down to under 100 mb as the application run in the background, after which the application swaps is only the data I am accessing. Can I trigger that memory release manually? (Maybe its another mechanism and not GC?!) TIA Tom Glod Founder & Developer MakeShyft R.D.A (www.makeshyft.com) Mobile:647.562.9411 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- Phil Davis 503-307-4363 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode