From: Matt J on
When I run blockproc (in R2009b), I sometimes see a progress bar flashed on the screen. It is not consistently reproducible, but happens when I type in this line several times.

A=rand(256,256); blockproc(A,[8,8],@(s) s.data(:) );

I'm wondering if anyone knows anything about this. I see nothing about it in the help.
From: Brendan Hannigan on
"Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <i3v6ld$lnc$1(a)fred.mathworks.com>...
> When I run blockproc (in R2009b), I sometimes see a progress bar flashed on the screen. It is not consistently reproducible, but happens when I type in this line several times.
>
> A=rand(256,256); blockproc(A,[8,8],@(s) s.data(:) );
>
> I'm wondering if anyone knows anything about this. I see nothing about it in the help.

There is some overhead involved in creating and updating the waitbar, so for performance reasons the waitbar in BLOCKPROC will only appear if the estimated time to complete the entire operation is above a certain threshold.

When you call BLOCKPROC for the first time, the "time to complete" estimates can be a bit longer than normal since the user function might not be in the MATLAB cache and this causes the execution time to be longer. This can cause the waitbar to appear. Subsequent calls using the same user function will often complete faster and the waitbar may not appear.

hope this helps,
-brendan
From: Matt J on
"Brendan Hannigan" <bhannigaHELLO(a)THEREmathworks.com> wrote in message <i43kri$2gp$1(a)fred.mathworks.com>...

>
> There is some overhead involved in creating and updating the waitbar, so for performance reasons the waitbar in BLOCKPROC will only appear if the estimated time to complete the entire operation is above a certain threshold.
>
> When you call BLOCKPROC for the first time, the "time to complete" estimates can be a bit longer than normal since the user function might not be in the MATLAB cache and this causes the execution time to be longer. This can cause the waitbar to appear. Subsequent calls using the same user function will often complete faster and the waitbar may not appear.
=================

Thanks for the info. It seems peculiar to me, though, that blockproc would maintain a waitbar at all. It doesn't seem to be a standard thing among Toolbox functions. Is there no way to turn it off? Since it's not really a graphical function, one can imagine situations where you'd like to suppress graphical output.
From: Brendan Hannigan on
"Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <i43qug$2lh$1(a)fred.mathworks.com>...
> "Brendan Hannigan" <bhannigaHELLO(a)THEREmathworks.com> wrote in message <i43kri$2gp$1(a)fred.mathworks.com>...
>
> >
> > There is some overhead involved in creating and updating the waitbar, so for performance reasons the waitbar in BLOCKPROC will only appear if the estimated time to complete the entire operation is above a certain threshold.
> >
> > When you call BLOCKPROC for the first time, the "time to complete" estimates can be a bit longer than normal since the user function might not be in the MATLAB cache and this causes the execution time to be longer. This can cause the waitbar to appear. Subsequent calls using the same user function will often complete faster and the waitbar may not appear.
> =================
>
> Thanks for the info. It seems peculiar to me, though, that blockproc would maintain a waitbar at all. It doesn't seem to be a standard thing among Toolbox functions. Is there no way to turn it off? Since it's not really a graphical function, one can imagine situations where you'd like to suppress graphical output.

The waitbar in BLOCKPROC was put in with the large-data use cases in mind. Since BLOCKPROC allows you to operate on arbitrarily large files as input, there can be cases where the function will take a very long time to complete. The waitbar works well in these cases to give feedback that things are "still moving" and give estimates as to how much time remains.

In R2009b and R2010a we have found, like you, that the waitbar is appearing too often in cases where it is not necessary.

Improving the BLOCKPROC user experience is a high priority for us that we hope to address in the (near) future.

Thank you very much for the feedback. I hope this helps!
-brendan