Skip to content

Performance issue on calculating classes count #1801

Closed
@Klaitos

Description

@Klaitos

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions