Exists(..) long waiting even with custom duration

Ask general questions here.
MJesper
Posts: 38
Joined: Fri Dec 28, 2018 2:16 pm

Exists(..) long waiting even with custom duration

Post by MJesper » Mon Apr 15, 2019 11:00 am

Hi I have a custom duration for the Exists method but things still take 30+ seconds to process, why's that?, thanks

Image

Code: Select all

			if([email protected](new Duration(200)))
			{
				return false;
			}

User avatar
Stub
Posts: 248
Joined: Fri Jul 15, 2016 1:35 pm

Re: Exists(..) long waiting even with custom duration

Post by Stub » Mon Apr 15, 2019 1:25 pm

Repository elements have their own search timeout value, which accumulates from the parent items, but when checking for an optional thing I frequently test for existence on a repository item thus:

Code: Select all

if (repo.someItemInfo.Exists(Duration.FromMilliseconds(1000))
    DoThing();
Obviously the hardcoded magic number is just for example!

MJesper
Posts: 38
Joined: Fri Dec 28, 2018 2:16 pm

Re: Exists(..) long waiting even with custom duration

Post by MJesper » Mon Apr 15, 2019 1:50 pm

That's what I'm doing, and from what I understand it should ignore the repository's search timeout if you put in your own value, but i'm not sure if it's doing that since it takes a very long time