long Javascript process and progress indicator

Dan Nigrin's icon

I have a long running process I'm running within Javascript (using v8) (manipulation of a very, very long list, which is converted to an array within the Javascript). I've added an outlet within the Javascript to send progress messages out of (a float that goes from 0.0 to 1.0), which in turn I have connected to a flonum in my Max patch. However it doesn't work - the flonum doesn't update until the long running process is complete.

I've tried deferlow-ing the initial message into v8, but that didn't work. Other suggestions as to how I might get visual feedback into my Max patch as to progress of the v8 process?

Dan Nigrin's icon

Answering my own question - I broke up the Javascript processing using the Task object https://docs.cycling74.com/apiref/js/task/

pdelges's icon

Although well hidden and undocumented, there is still the [progress] object in Max9… Beware, its name won't autocomplete.

Even the so handy [vdp] looks better!

Dan Nigrin's icon

Yeah, I'm using [progress], but did not want to complicate my initial post with that, since it's undocumented... ;-)

But what's [vdp]? Video Disc Player?