Deleting channels is incredibly slow
Photoshop CC 2014 with all updates. My script saves two selections to two channels. At the end I delete the channels using the following function.
function deleteChannelByName(channelNameToDelete) {
var channelRef = activeDocument.channels.getByName(channelNameToDelete);
channelRef.remove();
}
When I run the script in the Extend Script IDE and call this function to delete a channel containing a selection a dialog with a green progress bar and the title "Rebuilding histogram..." appears nine, yes 9, times. This makes deleting a channel an unbelievably slow operation. Am I doing something wrong or is this just the way it is? Thanks.