bbfsdev/bbfs — pull request #263 by genadyp (2014-04-07 18:51:30+00:00)
Title: Issue260 diff performance

connected to #260

-------------------

Tests ContentData specifications:
basic ContentData methods on 350_000 instances
* finish in less then within 5 minutes
* consume less then 250 MB

-----------------
Was found that ConntentData cloning is extremely expensive operation
>Init one object 350000 instances in less then 300 seconds: finished in **5** seconds
Init one object clone of 350000 in less then 300 seconds: finished in **59** seconds
Init more then one object two object of 350000 instances each in less then 600 seconds: finished in 9 seconds
Tests ContentData specifications:
basic ContentData methods on 350_000 instances
* finish in less then within 5 minutes
* consume less then 250 MB

-----------------
Was found that ConntentData cloning is extremely expensive operation
>Init one object 350000 instances in less then 300 seconds: finished in **5** seconds
Init one object clone of 350000 in less then 300 seconds: finished in **59** seconds
Init more then one object two object of 350000 instances each in less then 600 seconds: finished in 9 seconds
Init more then one object three object of 350000 instances each in less then 900 seconds: finished in 15 seconds

Init more then one object three object of 350000 instances each in less then 900 seconds: finished in 15 seconds

then minus of two ContentData objects was re-written without using cloning

----------------------
Was found then performance of Ruby2.1.1 is much better then Ruby1.9.3
>$ rvm current
**ruby-1.9.3-p327**
$ rspec -fd spec/content_data/content_data_performance_spec.rb
.....
minus of two objects with 350000 instances each finish in less then 300 seconds: **do not finished in 300 seconds**

>$ rvm current
ruby-2.1.1
$ rspec -fd spec/content_data/content_data_performance_spec.rb
......
minus of two objects with 350000 instances each finish in less then 300 seconds: **finished in 25 seconds**

**Then it is highly recommended to move to Ruby2.1.1**
With Ruby1.9.3 we still remain above 5 minutes for minus operation