appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

[Bug]-[Infinity]:API Edit UI Hangs When API Returns Many Records

Open sullo opened this issue 3 years ago • 7 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Description

When an API returns a lot of data, and then you try to edit it via the menu, the UI will hang completely.

A better way would be to display a certain amount of data and then allow the user to expand for more, or open a new window with full results, rather than have the UI freeze.

Steps To Reproduce

  1. Create an API that returns thousands of records. (my data is 6.2 mb returned)
  2. Tie a widget to call this API or run via API editor
  3. View API in editor where it will show full results
  4. UI freezes until it can display data and/or may not recover (requiring a closing of window/tab)

Public Sample App

No response

Version

Cloud

sullo avatar Apr 25 '22 15:04 sullo

@sullo is this on cloud? We generally have a limit to the amount of data returned

Nikhil-Nandagopal avatar Apr 29 '22 06:04 Nikhil-Nandagopal

Yes it was in the cloud.

sullo avatar Apr 29 '22 13:04 sullo

Affects queries on all data sources when the amount of data returned is large. Assuming 10% of all queries will pull large data, reach is ~1300

Stats

Stat Values
Reach 1300
Effort (months) <>

sribalajig avatar Sep 30 '22 07:09 sribalajig

@sullo which widget were you trying to display the data in? 6.2 MB of data does seem to be a lot of information to be displaying on a page. Could you please help us understand the use case here? For example, would paginating your response help here? Or did you intend to filter out irrelevant information as a second step? Or perhaps this just about displaying is an image as big as that?

nidhi-nair avatar Oct 26 '22 15:10 nidhi-nair

It was a table widget and an API call which triggered when the page opened.

But the real problem for me was that once I attempted this API call, the UI was unresponsive and I was unable to remove (or disable) the API call that did it. Because it ran on application load, there was no opportunity for me to use the UI to stop it before it tried to load and thus froze the UI.

That's why I was thinking in developer mode if data > Xmb (perhaps measured via content-length or Appsmith stopped loading data after Xmb the first time) with a user warning, I would have been able to just disable it easily. Or even maybe a way to open the app via the main page in some kind of "safe mode" where no APIs trigger would have worked.

I ended up having to quit apps and close tabs to free a lot of memory for the browser to be able to complete the load so I could disable the API call. This took around 5 minutes to load if I recall, and then the UI was very slow to respond.

Once I saw the behavior I reworked how my application loaded data, but that mistake was hard to recover from.

I hope that helps.

sullo avatar Nov 01 '22 13:11 sullo

@sullo can I check with you on whether you are still seeing this issue? Checking because the original issue was opened back in April and we are unable to reproduce this on the latest version of Appsmith with a sample app containing large data. Thanks.

sribalajig avatar Nov 04 '22 09:11 sribalajig

After that problem I changed how the application works so that is no longer a problem. So I am unable to test it again.

On Fri, Nov 4, 2022 at 5:19 AM Sri Balaji Gopinath @.***> wrote:

@sullo https://github.com/sullo can I check with you on whether you are still seeing this issue? Checking because the original issue was opened back in April and we are unable to reproduce this on the latest version of Appsmith with a sample app containing large data. Thanks.

— Reply to this email directly, view it on GitHub https://github.com/appsmithorg/appsmith/issues/13284#issuecomment-1303159756, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALICRFND55ZGUZLAOECHXLWGTILPANCNFSM5UI72GVA . You are receiving this because you were mentioned.Message ID: @.***>

--

https://cirt.net | https://rvasec.com/

sullo avatar Nov 04 '22 13:11 sullo

Closing this based on Balaji's latest comment

riteshkew avatar Apr 11 '24 15:04 riteshkew