apache / royale-asjs

Apache Royale ASJS
Apache License 2.0
373 stars 116 forks source link

UI hangs when trying to load dataGridList UI with array of 50k+ #1248

Open sunibala opened 4 days ago

sunibala commented 4 days ago

When we try to set dataprovider with data containing more than 50k, it processes for a long time and crashes randomly. Below are the observations from different datasets tried.

Around 40k - UI is able to load in few mins Around 50k - There is delay in two places - string into list conversion and set data in dataprovider. Setting data in dataprovider takes more than 5min and eventually crashes in some cases Around 70k - Royale unable to handle the load and crashes

Once we get the device list array, we assign the data to dataprovider to populate in grid UI. This call is taking more time to complete or crashes depending on count. The same is working fine in apache flash

DataGridListBase.as

set dataProvider() { ..... super.dataProvider = value; //ListBase.as ==> (model as ISelectionModel).dataProvider = value; ..... }

Also observed random hang in dataprovider function call in setting below iterator collectionIterator = collection.createCursor(); //IViewCursor(collection);

Kindly review the UI performance issue with huge set of data.

Nisaba commented 4 days ago

+1

I also experimented lack of performance in DataGrid, even with a few hundred of records. It seems to be worse if datasource is ArrayListView instead of ArrayList...

mjesteve commented 3 days ago

I usually use virtual components to load a large number of records. What control set are you using? MX, Jewel?

Nisaba commented 2 days ago

jewel for me

mjesteve commented 2 days ago

Nisaba, If you use Jewel VirtualList you will experience better performance.

Nisaba commented 2 days ago

Thank you for your feedback.

I don't know VirtualList... Is there a sample somewhere ?

mjesteve commented 2 days ago

TDJ: https://royale.apache.org/tourdejewel/#!virtual_lists_panel This is a repo with some other examples: https://github.com/mjesteve/royale-examples-community

Nisaba commented 1 day ago

Yes, I experiment good speed improvement with Virtual Datagrid.

But I experiment also display bugs. Please see in screenshots Datagrid vs VirtualDataGrid. Also, when I click on header, it acts like clicking in the first row... Any idea ?

image

image

mjesteve commented 1 day ago

I don't use VirtualDataGrid, I like VirtualList better. Why don't you send an email to the mailing lists? There will always be some other user working with VirtualDataGrid who can help you out: users@royale.apache.org dev@royale.apache.org

If we were unlucky, I'd try to give you a hand myself...

alinakazi commented 1 day ago

I didn't work on VirtualDataGrid either. If that doesn't work for you. You may try AGGrid, I will experiment with 70,000 records and will update you.

https://youtu.be/45YhBPqP0eE?si=cDptnk0kXyDw93NN

alinakazi commented 1 day ago

Let me know if you need any help with AGGrid

Nisaba commented 10 hours ago

@mjesteve OK, I've post to users list, thanks

@alinakazi AGGrid sounds good, Do you have a link to a sample in Royale ?

alinakazi commented 9 hours ago

Wrapper implementation:

https://github.com/mjesteve/royale-examples-community/tree/sliders/splideJS_AK/royalelibs/royale-splide/src/main/royale

Example:

https://github.com/mjesteve/royale-examples-community/tree/sliders/splideJS_AK/royaleapp/royalejewel/src/main/royale/org/apache/royale/community/views/aggrid