moosetechnology / Moose

MOOSE - Platform for software and data analysis.
https://moosetechnology.github.io/moose-wiki
MIT License
135 stars 34 forks source link

Replace PackageOrganizerCache by RPackage #414

Closed seandenigris closed 9 years ago

seandenigris commented 9 years ago

Originally reported on Google Code with ID 414

We have to check that RPackage and POC have exactly the same spec, but it should be
ok.

anyway, RPackage is significantly faster than POC and it would be a good way to stress
it before mainstream usage in Pharo.

Reported by simon.denier on 2010-06-11 13:32:58

seandenigris commented 9 years ago
I started to replace PackageOrganizerCache by RPackage. What I did is:
-> first Look at all references to PackageOrganizerCache
-> replace those refererences by a corresponding use of RPackage
-> run tests and fix them one by one

I'm in a state where all tests seem to be green.
Now I don't know how we want to integrate that.  With stephane we talked about having
a kind of 'transition state': we would have the possibility to use either the PackageOrganizerCache
or either RPackage, so that if something's wrong, we can quickly return to a working
version of moose.
Or maybe it would be better to integrate that directly ?

I guess that there is also some test to make about the performance. By comparing quickly
with old result registered in MooseScripts, RPackage seems to be a bit slower than
POC.But I should make a more precise comparison using the same machine and vm for both.

To load the version using RPackage, in a moose image evaluate:

Gofer new
    squeaksource: 'PharoTaskForces';
    package: 'ConfigurationOfRPackage';
    load.

(Smalltalk globals at: #ConfigurationOfRPackage) loadDefault.

Gofer new
    squeaksource: 'DelaunayTmpStuffs';
    package: 'Moose-SmalltalkImporter';
    merge.

Gofer new
    squeaksource: 'DelaunayTmpStuffs';
    package: 'Moose-Tests-SmalltalkImporter-Core';
    merge.

Gofer new
    squeaksource: 'DelaunayTmpStuffs';
    package: 'Moose-Tests-SmalltalkImporter-KGB';
    merge.

Reported by cy.delaunay on 2010-11-04 10:10:03

seandenigris commented 9 years ago
I implemented a class that run some benchmarks and then compare the twoversions of Moose
(the one using packageCache and the one using RPackage):

  Gofer new
     url: 'www.squeaksource.com/DelaunayTmpStuffs';
      package: 'BenchmarksMooseWithRPackage';
    load.

So in a fresh mooseImage:
  => first remove the method BogusInfo class >> package (which is in conflict with
'package method from RPackage')
  => evaluate 'BenchmarksMooseWithRPackage new runBenchmarks'

Here is the kind of result I have :

                                              PackageCache               RPackage

createModelForMorphic                         14652          12771          
createModelForPharo                           155803         153476         
createModelForMoose                           91940          125190         
createModelForNetwork                         3322           4463           
createModelForLAN                             24             2188           

So the two versions seem to have the same order of performances

Reported by cy.delaunay on 2010-11-09 15:10:44

seandenigris commented 9 years ago
We should make the switch, especially given that in the future Pharo will adopt RPackage
:)

Reported by tudor.girba on 2011-01-23 00:23:04

seandenigris commented 9 years ago
In fact to have your moose image working, better try with that:

Gofer new
        squeaksource: 'DelaunayTmpStuffs';
        package: 'Moose-SmalltalkImporter';
        version: 'Moose-SmalltalkImporter-cyrille_delaunay.102';
        merge.

    Gofer new
        squeaksource: 'DelaunayTmpStuffs';
        package: 'Moose-Tests-SmalltalkImporter-Core';
        version: 'Moose-Tests-SmalltalkImporter-Core-cyrille_delaunay.9';
        merge.

    Gofer new
        squeaksource: 'DelaunayTmpStuffs';
        package: 'Moose-Tests-SmalltalkImporter-KGB';
        version: 'Moose-Tests-SmalltalkImporter-KGB-cyrille_delaunay.3';
        merge.

    Gofer new
        squeaksource: 'DelaunayTmpStuffs';
        package: 'Moose-Core';
        version: 'Moose-Core-cyrille_delaunay.284';
        merge.

Reported by cy.delaunay on 2011-01-28 13:55:27

seandenigris commented 9 years ago
To make the switch, what should I do? That is what I think:

  => save each modified package (the four that are mentioned above) in the moose repository.
  => add RPackage to the default configuration

Reported by cy.delaunay on 2011-01-28 14:06:47

seandenigris commented 9 years ago

Reported by cy.delaunay on 2011-01-28 14:09:13

seandenigris commented 9 years ago
we should also remove the existing package cache and make sure the tests are still green.
Can you try removing the package cache and then running the tests?

Reported by tudor.girba on 2011-01-28 14:12:24

seandenigris commented 9 years ago
Gofer new
        squeaksource: 'PharoTaskForces';
        package: 'ConfigurationOfRPackage';
        load.
(Smalltalk at: #ConfigurationOfRPackage) perform: #loadDefault.

Gofer new
        squeaksource: 'DelaunayTmpStuffs';
        version: 'Moose-SmalltalkImporter-cyrille_delaunay.102';
        version: 'Moose-Tests-SmalltalkImporter-Core-cyrille_delaunay.9';
        version: 'Moose-Tests-SmalltalkImporter-KGB-cyrille_delaunay.3';
        version: 'Moose-Core-cyrille_delaunay.284';
        merge.

Reported by jannik.laval on 2011-01-28 14:33:59

seandenigris commented 9 years ago
For me it works. The only tests that failed was the PackageOrganizerCacheTest, what
seems normal ;) So I remove this class also, and integrate that 

Reported by cy.delaunay on 2011-01-28 14:47:28

seandenigris commented 9 years ago
Ok. Give it a try. Please also update the configuration of moose. When you are done,
I start another build.

Reported by tudor.girba on 2011-01-28 14:51:00

seandenigris commented 9 years ago
This is done

Reported by cy.delaunay on 2011-01-28 15:17:48

seandenigris commented 9 years ago

Reported by jannik.laval on 2011-01-28 20:06:23