Skip to content

Conversation

@dplewis
Copy link
Member

@dplewis dplewis commented May 28, 2017

I found an interesting issue using equalTo on a geoPoint.
This PR fixes this issue.

curl -X GET \
  -H "X-Parse-Application-Id: app_id" \
  -G \
  --data-urlencode 'limit=10' \
  --data-urlencode 'where={
        "location": {
            "__type": "GeoPoint",
            "latitude": 2.0,
            "longitude": 8.0
        }
      }' \
     http://localhost:1337/parse/classes/TestObject
error: Error generating response. ParseError {
  code: 119,
  message: 'Postgres doesn\'t support this query type yet {"__type":"GeoPoint","longitude":8,"latitude":2}' }

@flovilmart
Copy link
Contributor

Seems that you have a conflict

@dplewis
Copy link
Member Author

dplewis commented May 28, 2017

Oops

@dplewis
Copy link
Member Author

dplewis commented May 28, 2017

Quick question why do Postgres Tests run so fast? Is Postgres better than Mongodb?

@flovilmart
Copy link
Contributor

I couldn't say for sure, without proper profiling but:

  • less tests are run on PG (not that significant)
  • pg is actually faster to a 30% extent?
  • we have some poorly / slow functions in mongo adapter

And I'll take time to profile it correctly as some perf improvements can be easily identified

@dplewis
Copy link
Member Author

dplewis commented May 28, 2017

Thanks good to know

@flovilmart
Copy link
Contributor

I just ran a bunch of profiling of the tests, and nothing stands out as being the culprit for slower / slow tests in the JS code

@dplewis
Copy link
Member Author

dplewis commented May 28, 2017

I'm just surprised that it takes ~13 minutes to test against mongo.

@flovilmart
Copy link
Contributor

not 13 minutes, just over 7 minutes and 5:30 for PG.

@dplewis
Copy link
Member Author

dplewis commented May 28, 2017

Travis looks ok.

I'm asking because when I run locally the time difference is huge.

PG - 4 minutes 33 seconds
Mongodb - 9 minutes 20 seconds.

It maybe something with my computer. I'll look into it.

What do you use for profile tests?

@flovilmart
Copy link
Contributor

For the profiling, I just added --prof to the jasmine runner

@flovilmart
Copy link
Contributor

Perhaps because it has to download mongodb through mongodb runner

@codecov
Copy link

codecov bot commented May 29, 2017

Codecov Report

Merging #3875 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3875      +/-   ##
==========================================
- Coverage   90.26%   90.26%   -0.01%     
==========================================
  Files         114      114              
  Lines        7574     7578       +4     
==========================================
+ Hits         6837     6840       +3     
- Misses        737      738       +1
Impacted Files Coverage Δ
...dapters/Storage/Postgres/PostgresStorageAdapter.js 95.82% <100%> (-0.12%) ⬇️

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 73aafa2...75abcb8. Read the comment docs.

@flovilmart flovilmart merged commit b692e85 into parse-community:master May 29, 2017
@dplewis dplewis deleted the no-type-postgres branch May 30, 2017 11:08
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