We have this problem in our build setup too.
I think the fastest solution regarding performance to this problem is to use a move operation first:
Moving a folder on a filesystem is in general a lot faster than deleting a folder structure (like x1000 for deep folder structures).
Can the plugin be modified to create a .purgatory folder (maybe in the Jenkins home) and simply move the "workspaces" to be deleted into that folder?
The actual deletion could be run in the background on the .purgatory then, making it much faster.
What do you think of this?
Update. The same setup.
I have a workspace like:
When i set the clean-ws like:
include sv_2*
include svfe
include sv_instance
and mark the "directories" checkbox, the workspace is not being cleaned at all.
But if i leave only "include svfe", it works as expected: cleans svfe directory.
I suspect i do something improper but cannot deduct what…