Re: quickly wiping a card
On Sun, Sep 15, 2013 at 3:48 PM, Mark Schonewille m.schonewi...@economy-x-talk.com wrote: I wonder how long this takes: on deleteAllControls beep answer warning Delete all visible objects from stack \ the short name of the topstack ? with Cancel or Delete if it is Delete then lock screen lock messages drag from 0,0 to the bottomright of the current cd of the topstack delete end if end deleteAllControls 84 ms. and repeat for each -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ 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: quickly wiping a card
On Thu, Sep 26, 2013 at 9:00 AM, Dr. Hawkins doch...@gmail.com wrote: 84 ms. and repeat for each Scratch that; something really funky happened to my ide. At the moment, I'm getting 0ms for deleting a card, and for repeating for each line in the groupnames and deleting that group. And I was getting 50ms for kililng the card under that section. (and there were no messages in the queue; I checked. Then it got so weird that the editor didn't work right . . . [5.5.4]) -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ 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: quickly wiping a card
On Sat, Sep 14, 2013 at 5:27 PM, Mark Wieder mwie...@ahsoftware.net wrote: Saturday, September 14, 2013, 5:04:46 PM, you wrote: hmm, locking everything and deleting the card is down to 5 ms, but shouldn't there be a quick way to wipe? That's probably not a good idea if you mean locking messages. There are parts of the IDE that would like to be notified when objects they're tracking are deleted: the app browser, project browser, etc, and if they don't get notified things can get out of sync. I didn't even think about it as a matter for the IDE itself. Nor did I consider that it might be different in a standalone . . . If I enable suspend development tools will I get a similar result to what I would get in a standalone? (a few minutes to build a standalone for each run would get to be a bit much!) -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ 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: quickly wiping a card
Richard, I wonder how long this takes: on deleteAllControls beep answer warning Delete all visible objects from stack \ the short name of the topstack ? with Cancel or Delete if it is Delete then lock screen lock messages drag from 0,0 to the bottomright of the current cd of the topstack delete end if end deleteAllControls -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other colour spaces. http://www.color-converter.com Buy my new book Programming LiveCode for the Real Beginner http://qery.us/3fi Fill out this survey please http://livecodebeginner.economy-x-talk.com/survey/ On 9/15/2013 17:11, Dr. Hawkins wrote: I didn't even think about it as a matter for the IDE itself. Nor did I consider that it might be different in a standalone . . . If I enable suspend development tools will I get a similar result to what I would get in a standalone? (a few minutes to build a standalone for each run would get to be a bit much!) ___ 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: quickly wiping a card
Whoops... you might want to select the pointer tool and make sure that groups are deleted: on deleteAllControls beep answer warning Delete all visible objects from stack \ the short name of the topstack ? with Cancel or Delete if it is Delete then choose pointer tool set the selectGroupedControls to false lock screen lock messages drag from 0,0 to the bottomright of the current cd of the topstack delete unlock screen unlock messages end if end deleteAllControls (see also my previous e-mail) -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other colour spaces. http://www.color-converter.com Buy my new book Programming LiveCode for the Real Beginner http://qery.us/3fi Fill out this survey please http://livecodebeginner.economy-x-talk.com/survey/ On 9/15/2013 17:11, Dr. Hawkins wrote: I didn't even think about it as a matter for the IDE itself. Nor did I consider that it might be different in a standalone . . . If I enable suspend development tools will I get a similar result to what I would get in a standalone? (a few minutes to build a standalone for each run would get to be a bit much!) ___ 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: quickly wiping a card
Scott- Saturday, September 14, 2013, 7:23:35 PM, you wrote: Actually Mark, locking messages is often a good way to speed things exactly because the IDE doesn't track objects that are added or deleted until after the current handler has finished executing. Well, you had me going for a while there, but no. If you lock messages the IDE doesn't get the deleteobject message at all. This is what lock messages is supposed to do. Try this: in a frontscript put on deletefield put deleting cr after msg deletefield pass deletefield end deletefield Then create a new mainstack with a button and a field. In the button script put on mouseUp delete field 1 end mouseUp OK - now that you can see the deleting message in the message box, put a new field on the stack again and change the mouse script to on mouseUp lock messages delete field 1 unlock messages end mouseUp So yes, locking messages *is* a good way to speed things up in the proper situations, e.g., if you're doing this in a standalone you'll gain a significant boost, but there might be side effects if you try this in the IDE. -- -Mark Wieder mwie...@ahsoftware.net ___ 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: quickly wiping a card
Hi Mark: My point was, with messages locked, nothing can be updated until after the handler has executed (or you manually unlock messages). So if your scripts rely on tracking objects individually as they are deleted, then locking messages doesn't make sense. However, the original post explicitly mentioned clearing a card as quickly as possibly, and in this case, locking messages can make a substantial difference. Otherwise, the IDE will track each object as it is deleted. For example: -- CREATE A COLLECTION OF GRAPHICS: -- RUNS HERE MORE THAN 2x FASTER -- WITH MESSAGES LOCKED on mouseUp set style of the templateGraphic to oval set width of the templateGraphic to 200 set height of the templateGraphic to 200 set loc of the templateGraphic to loc of this cd put millisecs() into MS lock screen lock messages repeat 5000 create grc end repeat unlock messages unlock screen put millisecs() - MS reset the templateGraphic end mouseUp -- DELETE A COLLECTION OF GRAPHICS: -- RUNS NEARLY INSTANTANEOUSLY HERE -- WITH MESSAGES LOCKED, COMPARED TO -- MORE THAN 3 SECONDS WITHOUT on mouseUp put millisecs() into MS lock screen lock messages repeat number of grcs delete grc 1 end repeat unlock messages unlock screen put millisecs() - MS end mouseUp -- A couple of other tricks I use when creating or deleting numerous objects (call it a collection for the sake of discussion): 1) To delete a collection instantaneously at any time, I often create the objects of the collection inside a group. When I want to delete the collection, I only need to delete the group in a single action, as opposed to using a repeat loop on individual objects. 2) When creating or deleting large collections while in the IDE, I close the Application Browser. This stack continually tracks objects in a development stack, so closing it can speed up object creation/deletion time. Regards, Scott Rossi Creative Director Tactile Media, UX/UI Design On 9/15/13 4:26 PM, Mark Wieder mwie...@ahsoftware.net wrote: Scott- Saturday, September 14, 2013, 7:23:35 PM, you wrote: Actually Mark, locking messages is often a good way to speed things exactly because the IDE doesn't track objects that are added or deleted until after the current handler has finished executing. Well, you had me going for a while there, but no. If you lock messages the IDE doesn't get the deleteobject message at all. This is what lock messages is supposed to do. Try this: in a frontscript put on deletefield put deleting cr after msg deletefield pass deletefield end deletefield Then create a new mainstack with a button and a field. In the button script put on mouseUp delete field 1 end mouseUp OK - now that you can see the deleting message in the message box, put a new field on the stack again and change the mouse script to on mouseUp lock messages delete field 1 unlock messages end mouseUp So yes, locking messages *is* a good way to speed things up in the proper situations, e.g., if you're doing this in a standalone you'll gain a significant boost, but there might be side effects if you try this in the IDE. -- -Mark Wieder mwie...@ahsoftware.net ___ 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: quickly wiping a card
Scott, that runs in about 6ms for me, and the only things faster I could find were to make sure the objects were in a group and delete the group (as you suggested) or just create a new blank card and delete the existing card, and neither of those was faster than 4ms. On Sun, Sep 15, 2013 at 8:08 PM, Scott Rossi sc...@tactilemedia.com wrote: Hi Mark: My point was, with messages locked, nothing can be updated until after the handler has executed (or you manually unlock messages). So if your scripts rely on tracking objects individually as they are deleted, then locking messages doesn't make sense. However, the original post explicitly mentioned clearing a card as quickly as possibly, and in this case, locking messages can make a substantial difference. Otherwise, the IDE will track each object as it is deleted. For example: -- CREATE A COLLECTION OF GRAPHICS: -- RUNS HERE MORE THAN 2x FASTER -- WITH MESSAGES LOCKED on mouseUp set style of the templateGraphic to oval set width of the templateGraphic to 200 set height of the templateGraphic to 200 set loc of the templateGraphic to loc of this cd put millisecs() into MS lock screen lock messages repeat 5000 create grc end repeat unlock messages unlock screen put millisecs() - MS reset the templateGraphic end mouseUp -- DELETE A COLLECTION OF GRAPHICS: -- RUNS NEARLY INSTANTANEOUSLY HERE -- WITH MESSAGES LOCKED, COMPARED TO -- MORE THAN 3 SECONDS WITHOUT on mouseUp put millisecs() into MS lock screen lock messages repeat number of grcs delete grc 1 end repeat unlock messages unlock screen put millisecs() - MS end mouseUp -- A couple of other tricks I use when creating or deleting numerous objects (call it a collection for the sake of discussion): 1) To delete a collection instantaneously at any time, I often create the objects of the collection inside a group. When I want to delete the collection, I only need to delete the group in a single action, as opposed to using a repeat loop on individual objects. 2) When creating or deleting large collections while in the IDE, I close the Application Browser. This stack continually tracks objects in a development stack, so closing it can speed up object creation/deletion time. Regards, Scott Rossi Creative Director Tactile Media, UX/UI Design On 9/15/13 4:26 PM, Mark Wieder mwie...@ahsoftware.net wrote: Scott- Saturday, September 14, 2013, 7:23:35 PM, you wrote: Actually Mark, locking messages is often a good way to speed things exactly because the IDE doesn't track objects that are added or deleted until after the current handler has finished executing. Well, you had me going for a while there, but no. If you lock messages the IDE doesn't get the deleteobject message at all. This is what lock messages is supposed to do. Try this: in a frontscript put on deletefield put deleting cr after msg deletefield pass deletefield end deletefield Then create a new mainstack with a button and a field. In the button script put on mouseUp delete field 1 end mouseUp OK - now that you can see the deleting message in the message box, put a new field on the stack again and change the mouse script to on mouseUp lock messages delete field 1 unlock messages end mouseUp So yes, locking messages *is* a good way to speed things up in the proper situations, e.g., if you're doing this in a standalone you'll gain a significant boost, but there might be side effects if you try this in the IDE. -- -Mark Wieder mwie...@ahsoftware.net ___ 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: quickly wiping a card
I can confirm Scott's results but still, it seems that creating a group, creating the controls in it and deleting only the group is a must whenever it's possible. Here is the outcome of Scott's code in my mac: lock screen lock messages no group : create 2744ms, delete 7ms. lock screen no group : create 4540ms, delete 2312ms. no lock no group : well, it's indefinite; LiveCode just kept freezing every time I tried. lock screen lock messages with group : create 2944ms, delete 3ms. lock screen with group : create 4447ms, delete 22ms. no lock with group : create indefinite - freezing, delete 13ms. Various runs gave very close results so these are from the last one. Best, -- Ender Nafi Elekcioglu Sent with Airmail ___ 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
quickly wiping a card
I am trying to clear cards for output, but it seems to take bizarrely long. I'm on a fast machine (quad core 2.7ghz I7, 16gb ram, ssd). I can't get wiping things from or deleting a nearly empty card under 160 ms or so. I've tried delete, I've tried for each of the groupNames, then of the controls, I've tried locking the screen and messages, but it still takes an insanely large fraction of a second. Am I missing something? hmm, locking everything and deleting the card is down to 5 ms, but shouldn't there be a quick way to wipe? -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ 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: quickly wiping a card
Richard- Saturday, September 14, 2013, 5:04:46 PM, you wrote: hmm, locking everything and deleting the card is down to 5 ms, but shouldn't there be a quick way to wipe? That's probably not a good idea if you mean locking messages. There are parts of the IDE that would like to be notified when objects they're tracking are deleted: the app browser, project browser, etc, and if they don't get notified things can get out of sync. -- -Mark Wieder mwie...@ahsoftware.net ___ 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: quickly wiping a card
Actually Mark, locking messages is often a good way to speed things exactly because the IDE doesn't track objects that are added or deleted until after the current handler has finished executing. I don't have any additional suggestions other than lock screen/lock messages -- those are the two I use to make updates occur as quickly as possible. Maybe somebody else knows some other tricks. Regards, Scott Rossi Creative Director Tactile Media, UX/UI Design On 9/14/13 5:27 PM, Mark Wieder mwie...@ahsoftware.net wrote: Richard- Saturday, September 14, 2013, 5:04:46 PM, you wrote: hmm, locking everything and deleting the card is down to 5 ms, but shouldn't there be a quick way to wipe? That's probably not a good idea if you mean locking messages. There are parts of the IDE that would like to be notified when objects they're tracking are deleted: the app browser, project browser, etc, and if they don't get notified things can get out of sync. -- -Mark Wieder mwie...@ahsoftware.net ___ 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