From 2e8af445db0cf9cd9f89e2c4110de271ffbd3c1d Mon Sep 17 00:00:00 2001 From: Boris Sekachev <40690378+bsekachev@users.noreply.github.com> Date: Tue, 24 Dec 2019 16:05:35 +0300 Subject: [PATCH] Resolved performance bottleneck in merge function (#999) --- cvat/apps/engine/static/engine/js/shapeMerger.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cvat/apps/engine/static/engine/js/shapeMerger.js b/cvat/apps/engine/static/engine/js/shapeMerger.js index b1bdf7f16478..c7fc478c540b 100644 --- a/cvat/apps/engine/static/engine/js/shapeMerger.js +++ b/cvat/apps/engine/static/engine/js/shapeMerger.js @@ -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 } @@ -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); }