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

Minimize db query #919

Merged
merged 1 commit into from
Mar 8, 2016
Merged

Conversation

Marco129
Copy link
Contributor

@Marco129 Marco129 commented Mar 8, 2016

#896 do exist when allowClientClassCreation = true.

Using loadSchema and hasClass together will call Schema reloadData for three times, which is redundant in our case.
Changed to use collectionExists from db adapter.

Suppose user(admin) will not always update the schema if disabled allowClientClassCreation, we may consider cache the schema object in the future.

@codecov-io
Copy link

Current coverage is 90.19%

Merging #919 into master will decrease coverage by -0.83% as of a2d0b25

@@            master    #919   diff @@
======================================
  Files           72      72       
  Stmts         4165    4163     -2
  Branches       862     862       
  Methods          0       0       
======================================
- Hit           3791    3755    -36
  Partial         10      10       
- Missed         364     398    +34

Review entire Coverage Diff as of a2d0b25

Powered by Codecov. Updated on successful CI builds.

@drew-gross
Copy link
Contributor

Awesome!

drew-gross added a commit that referenced this pull request Mar 8, 2016
@drew-gross drew-gross merged commit 7143a12 into parse-community:master Mar 8, 2016
@steven-supersolid
Copy link
Contributor

I had allowClientClassCreation = [default value] when I ran the tests, which I think is true. Also had the useMasterKey: true in the query/save, so am not sure if the code path in the PR would be executed in that case as it checks if allowClientClassCreation === false?

Also, do we need to check allowClientClassCreation in RestQuery.js

I'll retest with allowClientClassCreation false and with this fix when there is a new version available.

@Marco129 Marco129 deleted the minimize-query branch March 9, 2016 07:27
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.

5 participants