1c580a2df7
async update of annotation matches, fixes deadlock in load_subtitles
2016-08-31 18:03:19 +02:00
1468ddbecb
towards supporting python 2 and 3
...
- use absolute_imports
- make use of six.moves
- use exec instead of execfile
- use list(dict) instead if dict.keys()
2016-08-25 18:34:36 +02:00
e9863c238e
always use get_operator, avoid case-insensitive match if possible
2016-06-30 11:28:09 +02:00
b6e4d33a43
add Annotation.findvalue index (used by findClips)
2016-06-30 02:42:24 +02:00
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
400b6650a2
Annotation.json: document empty-subtitle special case
2016-04-19 13:52:52 +01:00
af0d87b569
Annotation.json: reduce repeated layer lookups
...
It's actually quite costly to look up keys in CONFIG, particularly
inside a loop: this trims ~5% off get(keys=['layers']) for
annotation-heavy items.
2016-04-19 13:52:47 +01:00
1cc795995d
user.get_profile()->user.profile
2016-02-19 22:06:11 +05:30
e22cc432b3
use transaction.atomic
2016-02-19 21:55:09 +05:30
4f064fda76
Make Annotation.public_id non-NULLable ( fixes #2829 )
...
This fixes this race:
request 1 request 2
----------------------------- -------------------------
addAnnotation(...)
super(Annotation.self).save()
findAnnotations(...)
returns [{id: null, ...}]
annotation.public_id = x
returns {id: x}
2015-09-14 14:18:10 +02:00
8759b569da
Cache serialized entities when fetching many annotations
...
For a scene with ~5600 annotations, of which ~3100 are entities, this
cuts fetching the scene from 12 seconds to 2 seconds.
2015-09-14 14:08:02 +02:00
j
819181726a
slightly faster json serialization of annotations
2015-08-02 16:22:45 +02:00
j
ef56f4aec4
track annotation id in table to avoid IntegrityErrors while adding multiple annotations to one item, fixes #2780
2015-05-20 00:43:33 +05:30
j
e851dcabfb
entities are not links
2015-04-16 20:02:31 +00:00
j
1fb075a350
rename layer
2015-04-16 10:53:05 +01:00
j
484b33e39d
add option to return item keys in findAnnotation
2015-02-16 16:10:45 +00:00
j
f144a020ec
typo
2015-02-13 17:32:12 +00:00
j
f7bbcf027a
fix findvalue for entity annotations
2015-02-13 15:22:14 +00:00
j
ccfaa7db4a
add entity/document relation
2015-02-13 11:06:09 +00:00
j
ad8db3a293
return html value for entities
2015-02-06 15:11:19 +05:30
j
6662872225
remove unused import
2014-12-23 11:28:42 +00:00
j
4c582c14b5
better related name
2014-12-22 14:29:30 +00:00
j
9e9bf30c42
add new changelog and call add_changelog all over the place
2014-12-17 13:45:46 +00:00
j
901bd37e90
resolve entity to name, get_by_name for add/edit annotation api calls
2014-12-16 16:39:45 +00:00
j
15fb864d74
get entity by id after all
2014-12-16 15:21:24 +00:00
j
d52dc11b4c
get entity by name
2014-12-16 14:59:21 +00:00
j
b7ab390425
towards entity layer
2014-11-20 13:20:48 +00:00
j
928cc11663
wrap annotation updates into transactions
2014-11-18 14:55:21 +00:00
j
d6c10eb377
add getAnnotation, fixes #2572
2014-11-17 19:56:27 +00:00
j
25d794e803
create clips for all annotations
2014-11-17 16:56:30 +00:00
j
d6513d4570
return item id, exclude empty annotations
2014-10-26 17:44:36 +00:00
j
3232ce6989
rename Item.itemId to Item.public_id
2014-09-19 12:26:46 +00:00
j
dceb917316
add per annotation languages
2014-07-23 17:26:23 +02:00
j
9aa23e421d
fix Places with umlaut in hasPlaces mode, fixes #2399
2014-06-06 12:04:47 +00:00
j
ee80dbc502
allow more things at end of place/event names: '")], fixes #2145
2014-02-01 20:09:38 +00:00
j
ef3083ab2c
sort string should start with letters or numbers, fixes #19
2013-11-10 23:05:07 +00:00
j
94352559a3
save layer in changelog
2013-05-09 16:50:03 +00:00
j
661e005b78
dont expose ids of empty subtitles, fixes #1333
2013-03-02 08:57:39 +00:00
j
b1d83b0f93
cleanup unused imports and unused variables
2013-02-21 13:28:36 +00:00
j
b43a6cf647
double check if poster does not exist if it was created async
2013-01-29 07:19:57 +05:30
j
3f2ba727bd
dont fail if findvalue is not set
2013-01-12 08:12:11 +00:00
j
ec5158c03a
normalize find values and make lower case, also normalize and lowercase quieries
2012-11-18 20:26:13 +01:00
j
bc2c3b65ad
match alternativeNames too, <br>\n shouldbe one space fixes 992
2012-09-18 16:09:56 +02:00
j
04a5628268
delete annotation that is not on a clip layer
2012-05-30 17:29:09 +02:00
j
12226662f8
smarter places/events update
2012-05-27 14:21:08 +00:00
j
69b1e6c7b2
cleanup use of python-ox api
2012-05-27 13:52:12 +02:00
j
9da8c75f70
dont fail if clipLayers is missing
2012-04-02 17:33:09 +02:00
j
05a30e162c
typo
2012-03-09 23:57:17 +01:00
j
2ae9035a37
places too
2012-03-09 23:53:52 +01:00
j
4969719231
newlines
2012-03-09 23:47:36 +01:00