appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.29k stars 3.71k forks source link

[Bug]: Uploading JSON files on file picker causes the UI to freeze and throw unresponsive alert from the browser #15275

Open ramsaptami opened 2 years ago

ramsaptami commented 2 years ago

Is there an existing issue for this?

Description

When a canvas has at least a few dozen widgets and the filepicker widget is used to upload medium-sized JSON files (well within the upload limit set on the filepicker), the UI becomes unresponsive and at times browser ends up throwing an alert box to wait or close tab.

Steps To Reproduce

  1. Drop a handful of widgets on the canvas and group a few of them into containers.
  2. Download a few apps to your downloads folder
  3. Drop a filepicker widget and upload a few of the downloaded apps (let's say 3) using the filepicker widget - observe that the UI freeze when files are being uploaded and there's no indication on what is happening to the app. Clicking on the window also causes the browser to display an unresponsive alert box to either wait or kill the application.

image

Public Sample App

No response

Version

Cloud

dilippitchika commented 2 years ago

@ramsaptami can you share the app with @ashit-rath? @ashit-rath looks like a perf problem can you triage this?

ramsaptami commented 2 years ago

Shared the app with @ashit-rath

dilippitchika commented 2 years ago

@ashit-rath was able to triage the issue @ramsaptami. The reason for this performance bottleneck is because you are binding the data from the filepicker in a text widget.

The text widget can only handle certain number of line-breaks post which it starts throttling performance and sometimes leads to apps crashing. We fixed this issue already here - https://github.com/appsmithorg/appsmith/issues/10379

We have imposed a limit on the line breaks to be max of 2 lakh after which we remove line breaks. Based on the performance throttle in your app it feels like we have to decrease the limit even more and introduce our JSON Explorer widget #7090 for visualising objects. Parking this for now and will pick up when we have bandwidth.

dilippitchika commented 2 years ago

CC @somangshu triaging is done, please check this out. Need you to check if this is something which can be addressed within performance team.

dilippitchika commented 1 year ago

@somangshu FYI need some info what can we do here

somangshu commented 1 year ago

@dilippitchika no bandwidth on the performance side + this seems like an effort that will be made under #15699

Now we have already shipped a fix before that kinda deals with the same #12964, is this not helping us with the problem? What is still not working?

dilippitchika commented 1 year ago

Looks like we have to test this again once. @kamakshibhat-appsmith @chandannkumar can you please test this scenario again and let us know if there are any performance issues?

ramsaptami commented 1 year ago

I've updated the app link since it was broken before. You'll can use the new link @kamakshibhat-appsmith @ChandanBalajiBP

somangshu commented 1 year ago

@vsvamsi1 @SatishGandham can we close this issue?