Skip to main content

Hi,

Can someone explain to me what the advantage is of having the candidates first set to yes is in the following example is?

In the scenario that we can ABSOULTELY GUARENTEE that all candidates arrive at the transformer before the bases; and if candidates first IS set to yes, do the bases pass through transformer quicker?
Basically if the candidates are already waiting in the transformer do the bases just pass straight through, essentially meaning that it is NOT acting as a blocking transformer. If this is NOT the reason what is the actual point of the setting and when/why would you use it?

(I understand that if it is set to candidates first and the bases arrive first that they pass straight through without finding a neighbour). Normally I set it to NO just to make sure that no relationships are potentially missed but I am interested to know why you would set it as yes.

Thanks in advance.
Rob

Your first idea is true: As the BASE features are passed to the output port (not the candidates) all CANDIDATES are needed for calculation. So if all CANDIDATES are read before the BASES streaming the BASE features is possible and that will increase performance. If this is set to NO, the transformer will be a blocking transformer, reading all BASE and CANDIDATE features into memory before starting the calculations.


@erik_jan

Hi Erik,

Thanks very much for the
quick response and answer. That is great; I just wanted to make sure that I had
not missed something obvious. I guess you potentially have to use this setting
with caution; namely, only when you are supremely confident that the
Candidates will arrive before the Bases.

Thanks again,

Rob


@erik_jan

Hi Erik,

Thanks very much for the
quick response and answer. That is great; I just wanted to make sure that I had
not missed something obvious. I guess you potentially have to use this setting
with caution; namely, only when you are supremely confident that the
Candidates will arrive before the Bases.

Thanks again,

Rob

You could always use the FeatureHolder to hold on to the BASE features until all CANDIDATE features are processed. Another thing to know is that FME will read data in the order the readers are in the Navigator window. So if you use two readers (for BASE and CANDIDATES) and have no other transformers that can alter the order before entering the NeighborFinder, you can assume the order is the order of reading.


Reply