Skip to content

Commit

Permalink
Resolved performance bottleneck in merge function (#999)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev authored and nmanovic committed Dec 24, 2019
1 parent 7c90439 commit 2e8af44
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 2e8af44

Please sign in to comment.