Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Revisions: Issue #30479 Back to Issue ]
Summary 0030479: Stabilization: Creating a clone of an object should not fire any event
Revision 2015-08-19 10:01 by Orekaria
Description Stabilization: Creating a clone of an object should not fire any event

The clone information could be compromised
Revision 2015-08-18 18:47 by Orekaria
Description Stabilization: Creating a clone of an object should not fire any event

The problem is that if the clone fires events, unexpected behavior could happen because the creator of the object should not expect unexpected events to be fire

Another related problem is that performance is degraded because those events are fired and most of them are useless
Revision 2015-07-31 21:15 by Orekaria
Steps To Reproduce a) Verify that 'OB.UTIL.clone' in 'ob-utilities.js' is setting values without the 'silent: true' flag

b) Verify that when an object is cloned, the 'changed' event is fired for each of the set properties

c) Performance: execute with and without 'silent: true', the following script in the console log:

    var startTime = new Date();
    var receipt = new OB.Model.Order();
    for (var i = 0; i < 100; i++) {
      var frozenReceipt = new OB.Model.Order();
      OB.UTIL.clone(receipt, frozenReceipt);
    }
    var endTime = new Date();
    var timeDiff = endTime - startTime;
    console.error(timeDiff);

Verify that the time spent in the cloning is about 10% less when 'silent: true'
Revision 2015-07-31 20:53 by Orekaria
Steps To Reproduce a) Verify that 'OB.UTIL.clone' in 'ob-utilities.js' is setting values without the 'silent: true' flag

b) Verify that when an object is cloned, the 'changed' event is fired for each of the set properties

c) Performance: execute with and without 'silent: true', the following script in the console log:

    var startTime = new Date();
    var receipt = new OB.Model.Order();
    for (var i = 0; i < 100; i++) {
      var frozenReceipt = new OB.Model.Order();
      OB.UTIL.clone(receipt, frozenReceipt);
    }
    var endTime = new Date();
    var timeDiff = endTime - startTime;
    console.error(timeDiff);

Verify that the time spent in the cloning is about 10% less when the 'silent: true'


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker