I answer above.
On Tue, May 25, 2010 at 2:35 PM, Simon Denier <simon.denier(a)inria.fr> wrote:
On 25 mai 2010, at 14:06, Mariano Martinez Peck wrote:
> Hi Moosers. I am doing little experiments to export/serialize big graph
of objects using ImageSegment. I though that MooseModel was a good
candidate. And I even remember Simon's wishes for copying them. But I have a
couple of questions:
> 1) Which is the bigger autogenerated MooseModel I can get to test? For
the moment I am evaluating "MooseModel installDefaultModels". and then I
export "MooseModel root". Is there a bigger one I can use? how ?
Take a look at the MooseScripts class, class-side. There are a number of
methods to create moose models from the image itself. In order of
importance: Network << Moose << Pharo
With network, you won't have any problem. With a model of Moose itself,
it's fast enough to do lots of test yet you can still improve things. Then a
Pharo model is certainly a good scalability test.
This was very helpful. Thanks
> 2) How is the root or any other MooseModel normally exported? Which
methods? which technology ? Can you give me an example of the standard way
to export/serialize/copy a MooseModel ? The only thing I saw is MooseModel
class >> export: aModel to: aStream
> I just open a file and send it as Stream?
- File persistency is done in the MSE format and using Fame to serialize
entities in MSE.
Just take a look at MooseModel>>exportToMSEStream:
- To clone a model, just use MooseModelCopier>>copyModel: (this was a
simple experiment to make practical copies of large MooseModels. Or rather
to show that simple copy did not scale well on large MooseModel right now).
Here I have a couple of questions.
MooseModelCopier new timedCopyModel: MooseModel root -> 123
MooseModelCopier new timedCopyModel: MooseModel root first -> 3076
I don't understand how copying the root can be less than that copying an
element of the root.
Shouldn't copy the whole graph in case I want to copy the root? I was doing
all my benchmarks with the root but in the method timedCopyModel: I saw the
example in comment:
self new timedCopyModel: MooseModel root second
Another question, you said "Or rather to show that simple copy did not scale
well on large MooseModel right now"
Which is the simple copy you meant? Just aMooseModel copy ? deepCopy? clone
I want to compare for example the time with that simple way and with your
> 3) Suppose that I copy/export somehow a MooseModel (suppose the root) to
a file. I take another Moose image, I load the file, objects are alive again
and I replace MooseModel rootModel with the new object. How do I know if the
copy/export worked correctly ? If I do it in the same image, I can have
both, but how can I compare them to be sure everything was done ok ? method
#= has no sense as it will use Object with is #==. So...any idea to know if
the MooseModel I export and load again with ImageSegment is really working
I would change the tests setup to export/import the test model and run
tests on it (that's what I did to test the MooseModelCopier).
Where did you do that? I didn't find tests for MooseModelCopier?
Where can I change the export/import setup? I guess there is a TestResource
somewhere. Maybe in MooseModelTestResource ? or in subclasses?
Thanks for all the help
Only problem is that tests use some small models, so maybe some
be hidden. This is start though.
> I want to test exporting and loading these MooseModel with different
technologies but I need a way to know if the resulted object is correct or
> Ahhh please, cc' me in the mail as I am not sure I receive emails from
> Thanks for any hints.
> Moose-dev mailing list