cklester Well-Known Member Licensed User Dec 17, 2021 #1 I've got some data coming into my app from a websocket. It's coming in fast! Too fast! I need a grid that can keep up with the updates, and it seems B4XTable ain't gonna cut it. I've modified the B4XTable Editable example to simulate this. See attached project. (Use the buttons to toggle the various streaming speeds...) It handles "Easy Mode" streaming easily. Data changes every half-second, and the UI is responsive. It barely keeps up with "Difficult" streaming. Data changes... fast, and the UI is barely responsive. It completely fails with "Impossible" streaming. Data changes... really fast, and the UI locks up and is non-responsive. I tried it in Release as well as Debug, and both versions exhibit the same behavior. So, the big question is: What is the best approach to displaying this kind of streaming data in a table/grid format for B4J? Attachments b4xtable-speed-test.zip b4xtable-speed-test.zip 53.2 KB · Views: 503
I've got some data coming into my app from a websocket. It's coming in fast! Too fast! I need a grid that can keep up with the updates, and it seems B4XTable ain't gonna cut it. I've modified the B4XTable Editable example to simulate this. See attached project. (Use the buttons to toggle the various streaming speeds...) It handles "Easy Mode" streaming easily. Data changes every half-second, and the UI is responsive. It barely keeps up with "Difficult" streaming. Data changes... fast, and the UI is barely responsive. It completely fails with "Impossible" streaming. Data changes... really fast, and the UI locks up and is non-responsive. I tried it in Release as well as Debug, and both versions exhibit the same behavior. So, the big question is: What is the best approach to displaying this kind of streaming data in a table/grid format for B4J?
Erel B4X founder Staff member Licensed User Longtime User Dec 17, 2021 #2 Saying that B4XTable is too slow is incorrect. You are doing something that B4XTable wasn't built for. With that said, just by switching to RefreshNow it works fast enough with all your timers (in release mode of course). Upvote 0
Saying that B4XTable is too slow is incorrect. You are doing something that B4XTable wasn't built for. With that said, just by switching to RefreshNow it works fast enough with all your timers (in release mode of course).
cklester Well-Known Member Licensed User Dec 17, 2021 #3 Erel said: Saying that B4XTable is too slow is incorrect. Click to expand... To be fair, I did say "it seems," as I wasn't sure I was using B4XTable optimally. Erel said: You are doing something that B4XTable wasn't built for. Click to expand... Which grid/table view should I use for this? Erel said: With that said, just by switching to RefreshNow it works fast enough with all your timers (in release mode of course). Click to expand... Are you able to page through the table while at the Difficult and Impossible speeds? I can't, even in Release mode. Paging buttons are unresponsive. Maybe my PC can't handle it...? I'm using an Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz with 16GM RAM. Upvote 0
Erel said: Saying that B4XTable is too slow is incorrect. Click to expand... To be fair, I did say "it seems," as I wasn't sure I was using B4XTable optimally. Erel said: You are doing something that B4XTable wasn't built for. Click to expand... Which grid/table view should I use for this? Erel said: With that said, just by switching to RefreshNow it works fast enough with all your timers (in release mode of course). Click to expand... Are you able to page through the table while at the Difficult and Impossible speeds? I can't, even in Release mode. Paging buttons are unresponsive. Maybe my PC can't handle it...? I'm using an Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz with 16GM RAM.
Mashiane Expert Licensed User Longtime User Dec 18, 2021 #4 @cklester , your question inspired me you know. I ended up creating something about it in BVAD3, it was high time anyway to add CSV Import functionality. I talk abut this here... Check this out, https://www.b4x.com/android/forum/t...ovuetifyad3-the-new-series.132305/post-866363 Your CPU will do just well anyway... Upvote 0
@cklester , your question inspired me you know. I ended up creating something about it in BVAD3, it was high time anyway to add CSV Import functionality. I talk abut this here... Check this out, https://www.b4x.com/android/forum/t...ovuetifyad3-the-new-series.132305/post-866363 Your CPU will do just well anyway...
cklester Well-Known Member Licensed User Dec 19, 2021 #5 I tried using the Flex Grid (see attached project) from @Star-Dust . You can see it's keeping up somewhat well with the impossible stream of data, but there are a few issues: It is drawing over the prior cell contents. If I use invalidate, it blinks too much. It probably slows everything down as well. Also, the columns do not expand to fill the space. I suspect I would have to put some code in some kind of resize event... So, is there a way to invalidate or only redraw one cell? That might let me continue working on this project. Otherwise, I'll have to come up with more "clever" ways to display this data. Attachments flex-grid-speed-test.zip flex-grid-speed-test.zip 52.7 KB · Views: 491 Upvote 0
I tried using the Flex Grid (see attached project) from @Star-Dust . You can see it's keeping up somewhat well with the impossible stream of data, but there are a few issues: It is drawing over the prior cell contents. If I use invalidate, it blinks too much. It probably slows everything down as well. Also, the columns do not expand to fill the space. I suspect I would have to put some code in some kind of resize event... So, is there a way to invalidate or only redraw one cell? That might let me continue working on this project. Otherwise, I'll have to come up with more "clever" ways to display this data.
cklester Well-Known Member Licensed User Dec 19, 2021 #6 Not sure what's different about this version, but it seems B4XTable handles impossible quite well now... Huh? What did I do?! Attachments b4xtable-speedy.zip b4xtable-speedy.zip 53.3 KB · Views: 586 Upvote 0
Not sure what's different about this version, but it seems B4XTable handles impossible quite well now... Huh? What did I do?!