Friday, August 26, 2011

Re: display faster output of external app

Reply to message «Re: display faster output of external app»,
sent 23:24:27 26 August 2011, Friday
by niva:

Assuming MyMainFunc does not have range in its definition and initial value of
s:lnum is not `1':
execute s:lnum.',$call MyMainFunc()'
If it is `1' (meaning that you operate on the whole file):
%call MyMainFunc()
Both ways are just slightly faster and should be used to make code look better,
not to optimize anything.

Original message:
> In the same way, my RUN loop is moving cursor through the file to
> process each line.
>
> " loop cmd or item read
> while s:lnum <= line("$")
>
>
> "move cursor to the current line
> exe "".s:lnum
>
> " launch OPC Client
> call MyMainFunc()
>
>
> endwhile
>
> Is there a faster way to do the same ?
> Thank you

No comments: