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

Performance issue on calculating classes count #1801

Closed
4 tasks done
Klaitos opened this issue Sep 16, 2021 · 4 comments
Closed
4 tasks done

Performance issue on calculating classes count #1801

Klaitos opened this issue Sep 16, 2021 · 4 comments
Labels
type:feature New feature or improvement of existing feature

Comments

@Klaitos
Copy link
Contributor

Klaitos commented Sep 16, 2021

New Issue Checklist

Issue Description

When computing class counts, the number of documents in each collection, displayed on the sidebar, we loop on each collection and set the state for each collection. This method call the render function of the dashboard, slowing down all the process.

Steps to reproduce

With a parse-server with lots of collection (50+) : load the dashboard, try to navigate from the sidebar collection list.

Actual Outcome

Few seconds on each click to load a new page

Expected Outcome

It should be nearly instant

Environment

Localhost parse server on MacOS with nodejs 14.7

Dashboard

  • Parse Dashboard version: 2.2.0
  • Browser (Safari, Chrome, Firefox, Edge, etc.): Chrome
  • Browser version: 93.0.4577.63

Server

  • Parse Server version: 4.10.3
  • Operating system: MAC OS
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Local

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: 4.4.8
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): Local

Logs

I'm preparing a demo and trying to open a PR for you

@parse-github-assistant
Copy link

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@Klaitos
Copy link
Contributor Author

Klaitos commented Sep 16, 2021

Before.fix.record.mov

After my first try fix :

After.fix.1.mov

@mtrezza
Copy link
Member

mtrezza commented Sep 17, 2021

Amazing, thanks for opening this issue and submitting the PR!

@mtrezza
Copy link
Member

mtrezza commented Sep 20, 2021

Closing via #1802

@mtrezza mtrezza closed this as completed Sep 20, 2021
@mtrezza mtrezza added type:feature New feature or improvement of existing feature and removed type:improvement labels Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests

2 participants