Commit graph

87 commits

Author SHA1 Message Date
j
0d5c968026 space 2016-02-20 10:41:23 +00:00
j
051a3578b4 inline django 1.9 version of ox.django 2016-02-20 10:41:23 +00:00
j
4219246909 db migration 2016-02-20 15:15:01 +05:30
j
1cc795995d user.get_profile()->user.profile 2016-02-19 22:06:11 +05:30
j
5d63ad1760 default/upload_to=lambda breaks migrations, use functions 2016-02-19 21:59:26 +05:30
j
e22cc432b3 use transaction.atomic 2016-02-19 21:55:09 +05:30
j
e738503380 remove old migrations 2016-02-19 15:17:18 +00:00
j
35bdfba77c fix default values 2016-02-19 19:01:38 +05:30
j
d241b90b63 check data is a dict 2016-02-19 18:46:53 +05:30
j
2e3b61d163 dont fail if files are already gone 2015-10-04 18:17:34 +01:00
j
be1589569e fix clip index for newly added clips 2015-10-04 11:04:46 +01:00
eebb0b5681 Combine {Item,Clip,edit.Clip}.get_layers()
This has several benefits:

    • Clip.get_layers() (used by smart edits) and Item.get_layers() pick up
    the select_related('user') optimization added for static edits in
    r5007.

    • Static edits and items pick up the optimization from r4941 to select
    annotations once, not once per layer.

Fetching an item with ~1000 annotations took ~1s without this patch,
~0.34s with this patch. Another item with ~6000 annotations took ~11.6s
before, ~8.6s after.

Because this block is moved out to the top:

if user and user.is_anonymous():
user = None

then, for anonymous users,

"editable": false,

is no longer included in the annotations. The old behaviour ended up
including this key in all layers listed before the first private layer
in the config, and leaving it out from later ones. So this new behaviour
is more consistent.
2015-09-14 14:06:43 +02:00
3da3bd37fd addClips: return error if item/in/out missing, not 500 2015-08-07 13:37:56 +02:00
f3fdded07d Edit.json: preload annotation users
The expensive part of fetching an edit is JSONifying the clips'
annotations. Profiling showed that the main cost was Annotation.json(),
and within that:

File: /srv/pandora/pandora/annotation/models.py
Function: json at line 216

Line #      Hits         Time  Per Hit   % Time  Line Contents
==============================================================
216                                               def json(self, layer=False, keys=None, user=None):
217       632          827      1.3      0.1          j = {
218       632      1048170   1658.5     89.6              'user': self.user.username,
219                                                   }

Obviously this join just moves some of the cost further out, but it
brings my micro-benchmark down from 1.3s to 0.3s.
2015-08-02 16:02:47 +02:00
ab5a20d3a2 Treat findEdits({}) like findEdits({query: {}}) (fixes #2820) 2015-07-22 21:37:55 +02:00
j
abf445b7f1 faster edits 2015-04-25 19:02:34 +02:00
j
9197591bb6 tune smart clip queries 2015-04-25 16:13:42 +02:00
j
7b401cfe28 round duration to 3 2015-03-26 20:28:07 +05:30
j
5347c2e619 dont fail if condition does not have a value 2015-01-24 16:00:24 +05:30
j
139a5e3722 handle cut issues 2014-12-23 12:49:59 +00:00
rolux
ea1a94e9e4 update api docs (omissions, wording, typos) 2014-12-21 13:03:49 +00:00
rolux
3950213960 update api docs 2014-12-19 15:31:57 +00:00
rolux
cada20f904 update api docs 2014-12-19 15:05:08 +00:00
rolux
4a084d8405 update api docs 2014-12-19 12:59:10 +00:00
rolux
1ddc23b9f3 update api docs 2014-12-18 22:16:37 +00:00
rolux
0a56268b92 update api docs 2014-12-18 19:26:37 +00:00
rolux
7cfdf7b8db update api docs 2014-12-18 18:18:18 +00:00
rolux
8fd99ac1be update api docs 2014-12-18 16:39:47 +00:00
rolux
b78cc2c3f0 update api docs 2014-12-18 14:51:35 +00:00
rolux
51ad1475e0 update api docs 2014-12-18 13:49:51 +00:00
rolux
cf836ec172 add api docs 2014-12-18 13:38:20 +00:00
j
9e9bf30c42 add new changelog and call add_changelog all over the place 2014-12-17 13:45:46 +00:00
j
a9091db9ef clip_qs 2014-11-21 14:15:42 +00:00
j
c9fa0c78cd add missing imports 2014-11-20 18:30:12 +00:00
rolux
9e5fea2d06 start to improve API docs 2014-11-15 18:39:16 +00:00
j
8cb776eb51 compute edit duration more efficiently 2014-11-10 11:39:38 +01:00
j
ceb507020b data is passed to api functions now 2014-10-06 08:26:43 +00:00
j
3232ce6989 rename Item.itemId to Item.public_id 2014-09-19 12:26:46 +00:00
j
e381609b9e remove tests, not used 2014-09-05 13:39:43 +02:00
j
72d9dbf0f2 avoid passing open network connections to subprocesses, call Popen with close_fds=True 2014-09-02 14:24:12 +00:00
j
df84cf1aa7 return private clips in smart edits, fixes #2393 2014-06-06 11:38:03 +00:00
j
c41fbbc208 fix sort by cliptext, index is clip property 2014-02-12 12:42:25 +00:00
j
58e787efd7 wrap adding many clips in transaction, should be faster 2014-02-09 11:30:40 +00:00
j
77b19abd74 only return requested keys 2014-02-09 05:06:37 +00:00
j
fbaa24b9aa support nested smart edit queries 2014-02-07 10:13:49 +00:00
j
cfe8691f1a really fix sortClips for smart edits 2014-02-07 09:49:25 +00:00
j
920e6ccff9 also sort smart lists 2014-02-07 09:45:43 +00:00
j
0e71ada256 support creating edit with clips 2014-02-07 07:23:38 +00:00
j
f95fc3db6e allow adding 0 frame clips 2014-02-07 07:23:18 +00:00
j
875cbbeaa7 clip order 2014-02-07 06:47:06 +00:00