pandora/pandora
Will Thompson aa40a40595
Annotation.json: only include entity id & name
Fetching documents for each entity in turn is expensive. (I have tried
using ArrayAgg to fetch them in the same query as the Entity — no
improvement. It's possible that being able to join to entity_entity,
and then use ArrayAgg, would be better.)

Even once you've fetched them all, if the same entity appears many
times in an item, then get(..., keys=['layers']) duplicates the whole
JSON for the entity many times: expensive to serialize, expensive to
send over the wire.

Pandora's own web interface only depends on the 'id' key of 'entity' in
each annotation, and refetches the rest of the entity to show the pop-up
dialog when you press E. So by just not bothering to fetch and send any
other keys, get(..., keys=['layers']) on an item with many entity
annotations is substantially faster.

(I experimented with splitting the full entities off to one side, so,
you'd have:

    {
        "layers": {
            somelayer: [...,
              {..., "entity": {"id": ABC}},
            ], ...
        },
        "entities": {
            ABC: {...},
            ...
        }
    }

This is quicker than the status quo, but obviously not as fast as not
fetching & sending the rest at all!)
2016-04-28 14:15:23 +01:00
..
annotation Annotation.json: only include entity id & name 2016-04-28 14:15:23 +01:00
app use geoip2 api to fix ipv6 lookups 2016-03-04 12:50:44 +05:30
archive only update item timeline once all parts are done 2016-03-11 10:33:48 +01:00
changelog inline django 1.9 version of ox.django 2016-02-20 10:41:23 +00:00
clip findClips: look up entity names (fixes #2804) 2016-04-19 12:28:58 +01:00
document Include DocumentProperties.data in Document.json() 2016-03-05 15:07:47 +05:30
edit space 2016-02-20 10:41:23 +00:00
entity Entity.json: get document ids from join table 2016-04-28 14:15:12 +01:00
event Entity.alternativeNames: default to () not [] (fixes #2896) 2016-03-04 17:11:36 +00:00
item get_by_key: short-circuit 2016-04-05 12:19:31 +01:00
itemlist inline django 1.9 version of ox.django 2016-02-20 10:41:23 +00:00
log inline django 1.9 version of ox.django 2016-02-20 10:41:23 +00:00
news inline django 1.9 version of ox.django 2016-02-20 10:41:23 +00:00
oxdjango inline django 1.9 version of ox.django 2016-02-20 10:41:23 +00:00
person inline django 1.9 version of ox.django 2016-02-20 10:41:23 +00:00
place Entity.alternativeNames: default to () not [] (fixes #2896) 2016-03-04 17:11:36 +00:00
sequence inline django 1.9 version of ox.django 2016-02-20 10:41:23 +00:00
templates descriptions can contain quotes 2014-10-07 12:15:45 +02:00
text update pdf.js 2016-04-04 15:50:07 +02:00
title inline django 1.9 version of ox.django 2016-02-20 10:41:23 +00:00
tv inline django 1.9 version of ox.django 2016-02-20 10:41:23 +00:00
urlalias db migration 2016-02-20 15:15:01 +05:30
user fix user/group api 2016-03-08 20:14:05 +05:30
websocket remove optparse 2016-02-20 15:15:01 +05:30
__init__.py software powering 0xdb.org and Pad.ma is called pandora now 2010-02-16 15:52:34 +05:30
config.0xdb.jsonc remove persona support 2016-01-12 14:04:34 +05:30
config.indiancinema.jsonc Indiancine.ma: new items should be Under Copyright by default not Private 2015-10-21 14:26:13 +02:00
config.padma.jsonc add canPlayClips flag to annotation layers and use those layers to limit playback to clips 2015-08-27 11:27:27 +02:00
config.pandora.jsonc add canPlayClips flag to annotation layers and use those layers to limit playback to clips 2015-08-27 11:27:27 +02:00
gunicorn_config.py.in move gunicorn configuration from init script to config file 2016-03-07 14:25:24 +05:30
manage.py update imports 2016-02-19 22:06:10 +05:30
settings.py define BASE_DIR 2016-03-03 16:56:06 +05:30
urls.py inline django 1.9 version of ox.django 2016-02-20 10:41:23 +00:00
wsgi.py add wsgi 2016-02-20 15:15:02 +05:30