When you run it, is it the inner loop that is slow (I see you have an indicator on the index), or is it the outer? Without a data source it's not easy to do any tests.
Shift registers are the fastest option and your code looks OK as far as I can see.
You could perhaps use a presized stack in a functional global instead of the que. The que status VI should be linked to the deque function so that you don't get a race condition (currently there is no guaranteed execution order). Are you sure it's not the ques the code it waiting for? Unless the que contains new data everytime the loop has done an iteration (which should be fast) the loop will stop and wait for new data to arrive...You could perhaps get rid of the local of the time has passed and some other
minor stuff, but that would not explain the problem here.