Reduce computing by skipping the most 'getContains' calls without notable effect
This commit is contained in:
parent
5ca7a5e4a6
commit
6f9b07b64d
4
draw.js
4
draw.js
|
|
@ -424,6 +424,10 @@ var DrawingArea = new Lang.Class({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reduce computing without notable effect.
|
||||||
|
if (Math.random() <= 0.75)
|
||||||
|
return;
|
||||||
|
|
||||||
let coords = event.get_coords();
|
let coords = event.get_coords();
|
||||||
let [s, x, y] = this.transform_stage_point(coords[0], coords[1]);
|
let [s, x, y] = this.transform_stage_point(coords[0], coords[1]);
|
||||||
if (!s)
|
if (!s)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue