Skip to content

Reduces number of calls to injectDefaultSchema #5107

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

Merged
merged 1 commit into from
Oct 8, 2018

Conversation

flovilmart
Copy link
Contributor

@flovilmart flovilmart commented Oct 8, 2018

injectDefaultSchema is called for every single classes in the DB at each load of the schema, which can be very expensive and plain stupid as each request usually only affect 1 class:

x with fix without reduction
number of calls 85806 372653 4x

@flovilmart flovilmart force-pushed the schemaController-performance branch from 91e08dc to 5b9c521 Compare October 8, 2018 16:46
@codecov
Copy link

codecov bot commented Oct 8, 2018

Codecov Report

Merging #5107 into master will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5107      +/-   ##
==========================================
- Coverage   93.73%   93.69%   -0.05%     
==========================================
  Files         123      123              
  Lines        8879     8884       +5     
==========================================
+ Hits         8323     8324       +1     
- Misses        556      560       +4
Impacted Files Coverage Δ
src/Controllers/DatabaseController.js 94.73% <100%> (ø) ⬆️
src/Controllers/SchemaController.js 96.32% <100%> (+0.04%) ⬆️
src/Adapters/Auth/httpsRequest.js 95.23% <0%> (-4.77%) ⬇️
src/RestWrite.js 92.96% <0%> (-0.38%) ⬇️
...dapters/Storage/Postgres/PostgresStorageAdapter.js 97.08% <0%> (-0.09%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7fe4030...5b9c521. Read the comment docs.

@flovilmart flovilmart merged commit f1bc55b into master Oct 8, 2018
@flovilmart flovilmart deleted the schemaController-performance branch October 8, 2018 18:16
UnderratedDev pushed a commit to UnderratedDev/parse-server that referenced this pull request Mar 21, 2020
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.

2 participants