Skip to content

Commit

Permalink
Resolved performance bottleneck in merge function (cvat-ai#999)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev authored and Chris Lee-Messer committed Mar 5, 2020
1 parent 8b301e1 commit 928b729
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cvat/apps/engine/static/engine/js/shapeMerger.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ class ShapeMergerModel extends Listener {
object.shapes.push(
Object.assign(shapeDict[frame].interpolation.position,
{
z_order: this._collectionModel.zOrder(frame).max,
frame: frame,
attributes: shapeAttributes
}
Expand All @@ -150,7 +149,7 @@ class ShapeMergerModel extends Listener {
let copy = Object.assign({}, object.shapes[object.shapes.length - 1]);
copy.outside = true;
copy.frame += 1;
copy.z_order = this._collectionModel.zOrder(frame).max;
copy.z_order = 0;
copy.attributes = [];
object.shapes.push(copy);
}
Expand Down

0 comments on commit 928b729

Please sign in to comment.