Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
Updating during processing |
Tue, Jan 10 2017 12:17 PM | Permanent Link |
Matthew Jones | Is there a nice way to update some activity indicator while in a tight loop? Specifically, I'm loading a big load of JSON data into a list, and it takes something like 5 seconds or more. I'd like to show progress in a real manner. But I think that if I set a label to show progress, it won't update until the processing finishes. Is this right?
I can set up some sort of async thing with a current state, but that would significantly complicate the JSON reader, given it is not under my control currently. Any thoughts? (A simple spinner doesn't really do the job any more than a "loading" does...) -- Matthew Jones |
Tue, Jan 10 2017 1:36 PM | Permanent Link |
Matthew Jones | Matthew Jones wrote:
> I'm loading a big load of JSON data into a list, and it takes something like 5 seconds or more Always worth doing some measuring. The JSON loads in no time. The grid (unbound) was taking over 10 seconds. Not hard to make that into a procedure called with Async to fill 10 at a time and update a TLabel to show progress. And of course when I added BeginUpdate/EndUpdate around that, it takes only 4 seconds. All much better now. -- Matthew Jones |
Wed, Jan 11 2017 2:28 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matthew,
<< Always worth doing some measuring. The JSON loads in no time. The grid (unbound) was taking over 10 seconds. Not hard to make that into a procedure called with Async to fill 10 at a time and update a TLabel to show progress. And of course when I added BeginUpdate/EndUpdate around that, it takes only 4 seconds. All much better now. >> This is one of the major issues with the single-threaded nature of JS, and one that web worker support doesn't entirely solve because of the need to be interacting with the DOM/UI, which is not supported with web workers. It's tough nut to crack without doing exactly what you've settled upon: arbitrarily chopping up code in a way that allows the UI thread to process messages in-between blocks of JS code execution. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Sunday, December 1, 2024 at 03:59 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |