Commit Graph

57 Commits

Author SHA1 Message Date
j dbf740e55e use .editorconfig 2018-06-19 08:33:26 +02:00
j 859a820c90 add ui for lists/edits/collections groups 2018-03-06 15:11:05 +05:30
j 85c5fafe0d add groups to collections, edits and lists, towards #3063 2017-12-31 14:06:27 +01:00
j be34383f8c expose per clip volume in edits 2017-04-15 13:45:31 +02:00
j f0a4aba751 use python_2_unicode_compatible 2017-03-03 08:56:35 +01:00
j 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
j 9685c7e4a5 fix streams for static edits 2016-08-23 13:24:22 +02:00
j 5e149a5cb8 add space and other flake8 cleanups 2016-05-28 11:26:46 +02:00
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 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 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
Will Thompson 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
Will Thompson 3da3bd37fd addClips: return error if item/in/out missing, not 500 2015-08-07 13:37:56 +02:00
Will Thompson 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
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 139a5e3722 handle cut issues 2014-12-23 12:49:59 +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
j 8cb776eb51 compute edit duration more efficiently 2014-11-10 11:39:38 +01:00
j 3232ce6989 rename Item.itemId to Item.public_id 2014-09-19 12:26:46 +00: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 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 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
j ec946213e7 allow larger smart edits for now(1000) 2014-02-07 04:41:01 +00:00
j db06621528 fix clips query for smart edits 2014-02-06 14:22:53 +00:00
j a2473f6ce4 set default query on smart edits 2014-02-05 14:35:59 +00:00
j ccd214ecb4 limit clips in smart lists to 100, fix items for smart lists 2014-02-05 13:50:23 +00:00
j b2b2649420 make smart edits return clips inline 2014-02-05 13:21:17 +00:00
j 8aafc4f0b9 add smart edit support to backend 2014-02-05 11:27:17 +00:00
j 357e696f0d add annotations to edits 2014-01-22 18:24:21 +00:00
j 84db62b6ec fix edit.___unicode__ 2013-07-22 17:37:57 +00:00
j fd220fc675 include cuts in clips json 2013-07-18 10:42:40 +00:00
j 2710571eb0 add clip at index 2013-07-18 10:38:10 +00:00
j d45173b0da fix position of edits onload(like lists and texts) 2013-07-17 13:02:21 +00:00
j 70438cf6d3 order clips in transaction 2013-07-17 11:41:43 +00:00
j 64f58f4496 fix getEdit 2013-07-15 13:47:30 +00:00
j 3b7f55df58 use full annotation id 2013-07-15 12:13:39 +00:00
j 46da738b26 add some more metadata to clips 2013-07-15 11:44:05 +00:00
j 8b9aef56b4 fix setting edit icon 2013-07-14 16:58:01 +00:00