|
intoK Apprentice
Joined: 18 Feb 2007 Posts: 190
|
Posted: Fri Jan 15, 2010 9:28 pm
[3.12] sluggish zs.cmd.delc and #DELC |
they take ages to complete, when deleting big class (in my example with few hundred triggers in multiple subclasses) cmud freezes for some 2 minutes , while deleting from editor is reasonably fast (about 300-500s, about as long it takes to create them)
also, interestingly while all those triggers reside in disabled classes they add over 1 second to #CMD speedtest result (which might seem a little but for me its going from 2.3 to 3.5, so ~50% slower) |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Jan 15, 2010 10:20 pm |
Is the Editor open when you do this? Deleting from the background while the editor is open will be slow because of how the TreeView updates itself when settings are deleted. Deleting settings directly from the Editor doesn't have this problem because the editor knows exactly what is being deleted. You might try turning off the Auto Update option in the Editor View menu to see if it helps.
|
|
|
|
intoK Apprentice
Joined: 18 Feb 2007 Posts: 190
|
Posted: Sun Jan 17, 2010 12:46 pm |
cheers! yes, the editor was open and auto update was on, closing editor sorts it, but auto update has no effect, so much for leaving harmless window open
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Jan 18, 2010 6:43 pm |
Remember that doing a #DELC in a script is running in a separate thread. Updating the UI in Windows can only be done by the main thread. So when the Settings Editor is open, Windows needs to synchronize the script thread with the main UI thread for each database record that is deleted.
Whereas when you delete directly from the settings editor, you are already in the main thread and CMUD can easily turn off updates, then delete the records, then turn on updates again. There is no way for the background script thread to directly access the update flag in the settings editor UI.
Anyway, more than you probably wanted to know. Glad you got it working. I always recommend to people that they do not leave the settings editor window open unless they are actually making changes to their scripts. |
|
|
|
|
|