[openstreetmap/openstreetmap-website] Integrate the high-performance GPX importer (#1852)

mmd notifications at github.com
Thu Oct 4 10:58:02 UTC 2018


>  but nothing ever sets that attribute

Well, skip_uniqueness actually gets set for each tracepoint we add to `tps` by setting `tp.skip_uniqueness = true`.

> If it is "pointless" as you suggest then why not get rid of it

Pointless was more meant in a sense, that we're running the following 2 SELECTs for _each single GPS point_. Obviously this is a bit of a waste, as the trace file id, as well as the users id will be identical all the time. Assuming `tp.gpx_id = id` uses the correct id, there's no point checking this over and over.

```
SELECT  "gpx_files".* FROM "gpx_files" WHERE "gpx_files"."id" = $1 LIMIT $2  [["id", 21], ["LIMIT", 1]]
SELECT  "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2  [["id", 1], ["LIMIT", 1]]
```

By the way, maybe the change to trace.rb above will not be needed, once the _tracepoint --> trace_ validation is disabled.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/1852#issuecomment-426975215
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20181004/b721b34b/attachment-0001.html>


More information about the rails-dev mailing list