#High cpu/memory usage custom widget

1 messages · Page 1 of 1 (latest)

thorn gust
#

I have used the custom widget to creat a calendar and have noticed that the CPU/Memory usage peaks massively when on the page which has this widget.

when I viewed console, the widget runs constant API calls, a couple of calls per second.

I have attached 2 pictures to show the contrast...
When in the editor and on any other page CPU usage is relatively low, the picture shows 8.7%, it can vary between 0.3-~12%

When I move to the page which contains the calendar, CPU usage jumps up, the attached image shows it at 31.5% this is actually it at the lower end, it has been up around 50%

the memory usage also spikes and I have seen this up as high as 7500mb

Which then makes the computer run very slow and makes editing the app on this page difficult.

the other issue I have with the custom widget/calendar is that, I have set the calendar up on tab 1 and when I select an entry it then changes to tab 2 to display the information.
the back button is then set to take me back to tab 1 to view the calendar... It does this but then I am instantly sent back to tab 2.
It look as though along with the continuous API calls, that the calendar is also repeating the JS that I ran in order to view the entry

rapid cragBOT
#

Hey there,

Thank you for reaching out to the Appsmith support team. We've registered your
query, and our team is reviewing it.

In the meantime, to help us debug the issue, please consider following steps and
provide us the information:

  1. If you are a self-hosted user and this issue occurred after a recent
    Appsmith upgrade, consider rolling back to the previous version using the
    following
    steps
    .
    Alternatively, consider upgrading your instance to the latest release if you
    are not on the latest version.
  2. To further debug this issue, please share a [Loom video
    [http://loom.com/]](http://loom.com/ [http://loom.com/]) (screen recording)
    that demonstrates the steps leading up to the error/issue and elaborates on
    what result was expected instead.

Best regards,
Pranav Kanade

#

Hello! I'm SmithBot, your Appsmith support bot. To address the high CPU/Memory
usage and constant API calls issue: - Ensure that your API calls are not being
triggered on render or within a loop unintentionally. - Review the settings of
the widgets that might be causing the issue, particularly if you have any
onPageLoad or similar triggers enabled. - Verify if you have any JavaScript
code that is continuously running, perhaps by the use of intervals or recursive
calls. These should be managed carefully to avoid such scenarios. For the issue
with tab switching: - Check the logic on your back button to make sure it does
not inadvertently trigger any listeners or actions that would switch back to tab
2. - Make sure there's no JavaScript that automatically executes upon tab change
that may be interfering with your intended navigation flow. In both cases, you
might need to review your application's code. Due to what you're describing, it
sounds like there could be a mistake in the logic that leads to constant API
calls and incorrect tab navigation. If you can provide an outline of the logic
or code snippets used, I could assist you more effectively. If the problem
persists and requires urgent attention, I recommend reaching out to Appsmith
support for more hands-on assistance. If you don't find my response helpful, you
can request to speak to a human agent

little plover
#

@thorn gust Can you please share the export json of your app?

rapid cragBOT
#

Someone from our team will reach out to you on this thread. In the meantime, you
can have a look at our documentation to try & resolve your query
https://docs.appsmith.com?utm=bot

Organizations build internal applications such as dashboards, database GUIs, admin panels, approval apps, customer support tools, etc. to help improve their business operations. Appsmith is an open-source developer tool that enables the rapid development of these applications. You can drag and drop pre-built widgets to build UI. Connect securely...