how to clear residual garbage in a stack?
revdev at pdslabs.net
Mon May 21 20:50:08 EDT 2018
Use "compact stack" to get rid of space formerly used by now-deleted
See the docs.
On 5/21/18 5:42 PM, Neville Smythe via use-livecode wrote:
> I am constructing a large stack as a test for a bug report (to report the slow saving of large stacks for a standalone Windows 10 app under LC 8.x). I start with a stack with a single card which saves as a 28 KB file. I then use a script to create 299 copies of card 1. The resulting stack saves to a 8.2 MB file. As expected.
> I then deleted all but the first card, and re-ran the script so it again had 300 cards. This saves to a 16.4 MB file! Repeating the delete-and-create gives a 24 MB file. Evidently the data for the deleted cards has not been removed. I can think of efficiency reasons why this might be useful in the IDE, but there must/should be a way to reduce the file size to a minimum, otherwise stacks which continually delete and create data will just grow in a very user-unfriendly way.
> I can’t find any command such as clean or purge or free or compress or release garbage which will reduce the file size to its actual requirements. I have a vague memory of this being raised some years ago but I can’t find the reference. Surely there must be a built-in command? Because the only way I can see to reduce the size would be to create a new stack and copy over all cards and scripts and substacks before saving, which is ridiculous.
> BTW The bug: The 8.2MB stack saves on a Mac in 0.27 seconds. On Windows 10 saving time is 6.4 seconds. Other apps on Windows save an 8 MB file in under a second so the problem is not with the Windows OS or antivirus virus software or the particular machine. Possibly this bug is related to the reported unusablility of LC 9 IDE on Windows 10, of which I have heard no more since it was raised in this forum a few weeks ago, although my context is a standalone compiled under LC 8.x.
> Neville Smythe
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode