Skip to content

wip: Performance improvements #8416

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

Closed

Conversation

dblythy
Copy link
Member

@dblythy dblythy commented Jan 31, 2023

Pull Request

Issue

Attempting to increase the parallel speed of Parse Server

Closes: #7404

Approach

Tasks

  • Add tests
  • Add changes to documentation (guides, repository pages, code comments)
  • Add security check
  • Add new Parse Error codes to Parse JS SDK

@parse-github-assistant
Copy link

Thanks for opening this pull request!

  • ❌ Please edit your post and use the provided template when creating a new pull request. This helps everyone to understand your post better and asks for essential information to quicker review the pull request.

@dblythy
Copy link
Member Author

dblythy commented Jan 31, 2023

For some reason I haven't worked out yet, this:

  fit('can save objects', async done => {
    const start_parellel = Date.now();
    await Parse.User.signUp('username', 'password');

    const objects = [];
    for (let i = 0; i < 1000; i++) {
      const obj = new Parse.Object('TestObj');
      obj.set('field1', 'uuid()');
      objects.push(obj);
      if ( i == 0) {
          await obj.save();
        }
      }
    await Promise.all(objects.map(o => o.save()));
    const end_parellel = Date.now() - start_parellel;
    console.log(end_parellel);
    expect(end_parellel).toBeLessThan(6000);
  });

Runs in 1500ms on my computer, whilst without await obj.save(), it takes 5000ms.

@dblythy dblythy closed this Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance issue on version 4.x
1 participant