How to shorten 'Not Exists' duration
How to shorten 'Not Exists' duration
Is there a way to shorten the time it takes to search for an item that 'Not Exists'? Now it takes 30 seconds. Changing the Duration doesn't change it
Re: How to shorten 'Not Exists' duration
Actually, that is the correct way to do it, but you need to change the duration on all parent folders as well.
So, if you have a structure like this:
WebDocument (ROOT)
----BodyTag(Folder)
--------TDTag(RepoItem)
And you are trying to check that the BodyTag and TDTag don't exist, you need to set both of their durations.
Note that there are 2 SearchTimeout attributes for folders. One is under the folder object itself, the other is under the SelfInfo object.
For regular items, there is only one, under the ItemInfo object.
I don't know why it is like this, but for folders I have found that I have to change both for it to actually work the way I expect.
So, if you have a structure like this:
WebDocument (ROOT)
----BodyTag(Folder)
--------TDTag(RepoItem)
And you are trying to check that the BodyTag and TDTag don't exist, you need to set both of their durations.
Code: Select all
Duration newDuration = new Duration(5);
Duration oldBodyInfoDuration = BodyTag.SelfInfo.SearchTimeout;
Duration oldBodyDuration = BodyTag.SearchTimeout;
BodyTag.SelfInfo.SearchTimeout = newDuration;
Duration oldTDDuration = TDTagInfo.SearchTimeout;
TDTagInfo.SearchTimeout = newDuration;
if (BodyTag.SelfInfo.Exists() and TDTagInfo.Exists()) {
//do something here...
}
BodyTag.SelfInfo.SearchTimeout = oldBodyInfoDuration ;
For regular items, there is only one, under the ItemInfo object.
I don't know why it is like this, but for folders I have found that I have to change both for it to actually work the way I expect.
Shortcuts usually aren't...