Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: App running on Docker is very slow in development mode #13690

Closed
1 task done
PaulMcF1987 opened this issue May 9, 2022 · 31 comments
Closed
1 task done

[Bug]: App running on Docker is very slow in development mode #13690

PaulMcF1987 opened this issue May 9, 2022 · 31 comments
Assignees
Labels
Bug Something isn't working Needs More Info Needs additional information Needs Triaging Needs attention from maintainers to triage

Comments

@PaulMcF1987
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Description

I am running this app on Docker.
I am finding that it is running very slow in development mode, I tried deploying the app and it runs slightly quicker but is still extremely slow, it can take up to 1 minute for the selected page to load.

Also, when I click on a table row, I have it set to open a Modal. Again, the modal can take up to 1 minute to open and when it does, often it is blank. I need to close the modal, refresh the page and then open it again. I have found on occasions that I need to do this more than once in order for it to work.

I am using a Docker hosted MYSQL Database. I tried to connect it to my local hosted database but was unable to establish a connection.
I have used docker hosted SQL databases with other Images/containers and never had a problem So I doubt that the SQL Database is the issue, I have tested the database with HeidiSQL and it is very responsive.

Steps To Reproduce

My YML File

version: "3"

services:
appsmith:
image: index.docker.io/appsmith/appsmith-ce
container_name: appsmith
ports:

  • "9011:80"
  • "9012:443"
  • "9013:9001"
    volumes:
  • ./stacks:/appsmith-stacks
    labels:
    com.centurylinklabs.watchtower.enable: "true"
    restart: unless-stopped

auto_update:
image: containrrr/watchtower:latest-dev
volumes:

  • /var/run/docker.sock:/var/run/docker.sock

Update check interval in seconds.

command: --schedule "0 0 * ? * *" --label-enable --cleanup
restart: unless-stopped

Public Sample App

No response

Version

Self Hosted

@PaulMcF1987 PaulMcF1987 added Bug Something isn't working Needs Triaging Needs attention from maintainers to triage labels May 9, 2022
@rohan-arthur rohan-arthur changed the title [Bug]: [Bug]: App running on Docker is very slow in development mode May 9, 2022
@rohan-arthur rohan-arthur added the Docker Issues related to docker label May 9, 2022
@github-actions github-actions bot added the DevOps Pod Issues related to devops label May 9, 2022
@Nikhil-Nandagopal Nikhil-Nandagopal added Needs More Info Needs additional information and removed Docker Issues related to docker DevOps Pod Issues related to devops labels May 10, 2022
@Nikhil-Nandagopal
Copy link
Contributor

Hi @PaulMcF1987 ! Do you perhaps have a lot of data being loaded into the application? You can limit the data your queries return and paginate them with a table to make your apps performant

@PaulMcF1987
Copy link
Author

Hi @Nikhil-Nandagopal I have also asked this question on the AppSmith Community page.
There is very little data being processed as it is only in development mode and each table has 5-6 entries

https://community.appsmith.com/t/very-slow-in-edit-and-deployment-mode/954

That is my question on the community page which gives a bit more info

@Nikhil-Nandagopal
Copy link
Contributor

@PaulMcF1987 can you share the application with us by inviting support@appsmith.com to your application? We'd like to debug what is not working here

@PaulMcF1987
Copy link
Author

@Nikhil-Nandagopal I have sent the invite and set you as Administrator

@Nikhil-Nandagopal
Copy link
Contributor

@PaulMcF1987 can you also share the link to the app?

@PaulMcF1987
Copy link
Author

@Nikhil-Nandagopal that appears to be another problem I have, I have set up the SMTP credentials but it is not sending emails. If I press the test button, it works fine and sends a test email, however if I click the "forgotten password" link for example, nothing happens

@Nikhil-Nandagopal
Copy link
Contributor

@PaulMcF1987 that is ok, you can just share the link here and I can signup with the support email you invited

@PaulMcF1987
Copy link
Author

@Nikhil-Nandagopal Id rather not share domain details on here. I think I have sorted the SMTP Credentials,hopefully you should receive an invite?

@PaulMcF1987
Copy link
Author

PaulMcF1987 commented May 10, 2022

@Nikhil-Nandagopal did you receive the invite?
It is the "Job Record" page that I find to be the slowest

@Nikhil-Nandagopal
Copy link
Contributor

@PaulMcF1987 yes I got it. Do you mind sharing a video of where you see the slowness?

@PaulMcF1987
Copy link
Author

PaulMcF1987 commented May 10, 2022

@Nikhil-Nandagopal

https://share.vidyard.com/watch/xxf1XgXD9f76UcYt4qCcsb?

You will see from the video that most tabs load quickly, however the Job Record tab takes a while, Also, when I clicked on the row to open the modal, the modal opened and was blank, I had to close the modal and reopen for it to wrok

@Nikhil-Nandagopal
Copy link
Contributor

@PaulMcF1987 thanks! @SatishGandham from our team is looking into this

@PaulMcF1987
Copy link
Author

Thanks @Nikhil-Nandagopal @SatishGandham
Will I still be able to edit the app? or should I wait to hear back from you?

@Nikhil-Nandagopal
Copy link
Contributor

@PaulMcF1987 in the recording you shared, the table row was already selected so it became deselected when you clicked on it. This caused the modal to become blank. You can solve this by creating a custom button to open the modal and binding the modal contents to Table1.triggeredRow

@PaulMcF1987
Copy link
Author

Hi @Nikhil-Nandagopal thank you for your reply. However that is issue is quite low on the list compared with the rest.

The main issue is how long it takes for the table to show in the first place. Then when I click the row, a blank modal opens, I need to close the modal and reopen to populate. In the video, the modal was populated on the first reopen attempt however in reality it can take 3-4 attempts.

@PaulMcF1987
Copy link
Author

@Nikhil-Nandagopal @SatishGandham Any ideas as to what could be causing the issues?

@PaulMcF1987
Copy link
Author

@Nikhil-Nandagopal @SatishGandham

https://share.vidyard.com/watch/AqqxvSKNEP1vveSBqtcFXc?

Another video...
You will see from this video that when I clicked the link to view the table, it took at least 10 seconds for the page to load and then a further 3-5 seconds for the data to display
And there are only 2 entries on the table...

In reply to the above, you will notice in the video that I selected the second row which was not pre-selected and still when the modal opened it was not populated.

https://share.vidyard.com/watch/RQLtpBwf96rQ6qBstYrjM2?

In this video I ran the app outwith editor mode.
The same happened, it took a while for the table to load
After it did, you will see that I opened the modal and it was populated and then the information disappeared.
Each time after, the modal took a while top open after selecting the row.

The only thing I can think of is the number of Queries and JS I have on that particular tab, however there are only 18 JS scripts and 6 Queries which isnt that much
And they are very basic

@SatishGandham
Copy link
Contributor

@PaulMcF1987

  1. I'm unable to reproduce the blank modal issue.

https://share.vidyard.com/watch/RQLtpBwf96rQ6qBstYrjM2

In the second video you ran the app in preview mode, it is just edit mode with the property pane and entry explorer hidden, this is different from the view mode your end-users will use.

View mode is taking 5.5 seconds to load. We are continuously working on making Appsmith faster, and I believe we can shave up to 2 seconds of the current 5.5 seconds in view mode, I don't have an ETA for this improvement though.

In Edit mode it takes 8 seconds for the page to load, we have some improvements coming in the next couple of releases that will make it faster by 3 seconds.

Regarding modal, when you click the row a second time, it is getting unselected, so on row change is not getting triggered.

You should set the default selected row on the table to empty and reset the table on modal close action (How to reset a widegt )
That said, I feel the modal is slow for a good UX and we are working on it.

@PaulMcF1987
Copy link
Author

@SatishGandham
Thank you for your reply.
While I understand your response, the thing that puzzles me is why it works fine on some pages and not on others.

I would understand if the issue was persistent on all pages but but it is not.

So I am still left in the same position... wondering what it is about the data on this page that is causing the issue.

Have you looked at my Queries or my JS to see if the formatting might be causing an issue?

@SatishGandham
Copy link
Contributor

@PaulMcF1987 Can you tell me the page that is slow and the one that is fast.

@PaulMcF1987
Copy link
Author

@SatishGandham
https://share.vidyard.com/watch/oFWB2utH9jcWrR6DtfhiVk?

You should see from that video that all pages loaded quicker than the Job Record page.
However, they all seemed to have lag

If you click on the invoicing tab, it loads very quick because it is using the default data with no queries. It seems to be the queries that is slowing things down
However, that is just a guess

You should have access to log in and test?

@SatishGandham
Copy link
Contributor

@PaulMcF1987 ,
Your job board is slower compared to other pages because of the number of widgets. It's not due to the queries, your queries account for 1 second in the 5.5seconds it takes to load in view mode on my system.

We generate a data tree of all the widgets you have on the page on load, and update it when something changes. The time it takes is proportional to the number of widgets, in your case it is taking 3000ms. This is the reason it is slower compared to the rest of the pages.

@PaulMcF1987
Copy link
Author

@SatishGandham is there any way to speed this up?

Everything seems to load on page load, however, not everything is needed to load then.

For example, on page load, all that neds to load is the table.
Once I click the table to open the modal then the first tab of the modal needs to load, If I view another tab then I would expect that to load.

I have used other app builders such as Budibase and corteza and the speed of the app seems to have no bearing on the number of widgets.

The majority of the widgets on the page are input widgets for editing or creating an entry. My app is pretty basic. If someone wanted to produce a more complex app with more widgets, if what you are saying is true then Appsmith would essentially be useless?

@PaulMcF1987
Copy link
Author

@SatishGandham is there any way to speed this up?

Everything seems to load on page load, however, not everything is needed to load then.

For example, on page load, all that neds to load is the table.
Once I click the table to open the modal then the first tab of the modal needs to load, If I view another tab then I would expect that to load.

I have used other app builders such as Budibase and corteza and the speed of the app seems to have no bearing on the number of widgets.

The majority of the widgets on the page are inout widgets for editing or creating an entry.

@SatishGandham
Copy link
Contributor

@PaulMcF1987 , I'm sorry there is nothing you can do from your side expect design your app in a way that a single page doesn't have so many widgets.

We are working on building the dataTree faster, but we don't have an ETA on it yet.

@PaulMcF1987
Copy link
Author

@SatishGandham

To test out what you said above, I cloned the page and removed the widgets, leaving only the table...

The video below shows me going between the 2 tabs.
Even with the widgets removed the page still loads slow which tells me that this is not the issue

https://share.vidyard.com/watch/EhcKY7WArqsmVSWpobEZ8s?

The other video below shows a comparison of the job copy table with as mentioned only the table widget and another page with more widgets but less queries and JS scripts and despite having less widgets is still considerably slower

https://share.vidyard.com/watch/7mEgdRqTmyoyTDM9DzCkP9?

@PaulMcF1987
Copy link
Author

@SatishGandham @Nikhil-Nandagopal

Rather than using a modal is there any way to create a form on a different page that populates with data from the selected table row?

@Nikhil-Nandagopal
Copy link
Contributor

@PaulMcF1987 yes, you can pass the selected rows id to the page that has the form and have the form fetch the data of the row id in the query param as {{appsmith.URL.queryParams.id}}

@PaulMcF1987
Copy link
Author

PaulMcF1987 commented May 13, 2022

@Nikhil-Nandagopal How do i use this?

I have created 3 new pages...
When I select the table row, it then takes me to view page, from there I can chose to go to an edit or clone page...

If I go to the edit page and decide not to edit the document, is it possible to then navigate back to the view page and have the same details there that where displayed before I navigated away?

@Nikhil-Nandagopal
Copy link
Contributor

@PaulMcF1987 you should pass the id of the data that you want to populate so that you can query that data using the id and pass it to all the widgets

@Nikhil-Nandagopal Nikhil-Nandagopal added the Performance Pod All things related to Appsmith performance label Jan 23, 2023
@github-actions github-actions bot removed the Performance Pod All things related to Appsmith performance label Jan 23, 2023
@SatishGandham
Copy link
Contributor

@PaulMcF1987 , we have shipped the evaluations related optimization in the first week of Jan 23. Can you please verify if it solved your performance problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Needs More Info Needs additional information Needs Triaging Needs attention from maintainers to triage
Projects
None yet
Development

No branches or pull requests

4 participants