Peter TB Brett wrote:

> On 10/06/2016 16:31, Richard Gaskin wrote:
>
>> From time to time it's useful to know how much RAM may be available
>> to an application, to make decisions about loading data.
>
> No, it isn't useful.  Don't do this.
>
> At the very best, you'll have a Time-of-check-to-time-of-use error
> (i.e. you check a condition time X, and do something that assumes the
> condition at time Y, but in the intervening time something happens
> elsewhere in the system that invalidates the condition).  And on most
> operating systems, the result will be total lies.
>
> Just go ahead and load the data.  If it fails, then try a smaller
> chunk.

I once got the same advice from Mark Lucas, the lead engineer for SuperCard, so it would be foolish for me to disregard the same guidance so consistently offered.

The challenge, however, is that currently most xTalks, including LiveCode, sometimes have difficulty reporting errors in low-memory conditions. When bad enough, it can sometimes cause a crash before we're able to check "the result" and apply any remedy.

Any advice for working gracefully in potentially RAM-taxing routines?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 ____________________________________________________________________
 ambassa...@fourthworld.com                http://www.FourthWorld.com


_______________________________________________
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

Reply via email to