MATLAB: In data acquisition start and extract data should be inside the loop or outside

getdatastart(ai)

i have ni DAQ card , time consumed by triggering(start(Ai)) and extracting(getdata(ai)) is too much , how can i reduce it ??
whether data acquisition will consider all the existing pixels if i write those codes outside the for loop which is used for addressing the pixels ?
in case i write those code outside the loop the time taken to execute is very less , so which among(inside or outside the loop)is the wright choice .

Best Answer