Trouble searching for a string with a string created by relevance

(imported topic written by lmpymilk)

if I run this in the relevance debugger it takes no more than 55 ms

lines
whose
(
exists
tuple string
item

0

whose
(
it

is
((
it

as
string)
of
(
“1.2.3.0”
)))
of

it
)
of
files
"C:\Stuff_1.0.0.0_255.255.255.255-CA3.txt"

if I run this in the relevance debugger it takes no more than 2.5 ms.

((
it

as
string)
of
(subnet address
of
adapters
whose
(dns suffix
of

it

contains

“.foobar.org”
)
of
networks))

but if I run this it always takes greater than 33000 ms.

lines
whose
(
exists
tuple string
item

0

whose
(
it

is
(((
it

as
string)
of
(subnet address
of
adapters
whose
(dns suffix
of

it

contains

“.foobar.org”
)
of
networks))))
of

it
)
of
files
"C:\Stuff_1.0.0.0_255.255.255.255-CA3.txt"

I think what is taking it so long is that it is collecting the subnet before checking each line. I’m hoping somebody can direct me to a better way.

Thanks

Chris

(imported comment written by lmpymilk)

For anyone trying this on their own, if the number of lines is small like only 500, this is still quick. The list of subnets that I am looking at is over has 20,787 lines.

   Here is an example of the line would look something like this. This example shouldn't make much difference as long as you are able to retrieve item 1.

1.4.1.0|Aapple|1234 Long Rd.|1|Small Town Data Center|Small Town|ST506|Small Town Data Center Parking Lot|SDC|FL|99132|FL|STDC|