Why MC when you copying a package doing too much things?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Why MC when you copying a package doing too much things?

Igor Stasenko
 
If you look how MC copies package from remote repository to
package-cache dir, you will find out ,
that it:
 - reads and parses all definitions from source package
 - and then writes all these definitions into a new file

while instead it could just simply copy the contents of existing file
to the directory and that's it.

This actually explains why uploading VMMaker to squeaksource takes
ages (and most of the times time outs),
simply because on server we have this unnecessary load of
read-deserialize-serialize-write cycle
while it could be just
read-write (copying).

I think we could make it faster by copying and then parsing only the
necessary parts of package, like commit log and ancestry information,
but not parsing the whole package contents.

Another approach is of course to split bloated VMMaker package into parts..
but the problem is that for building VMs there's already too many
stuff there.. for example look at the configuration of cog:

                        package: 'FFI-Pools' with: 'FFI-Pools-eem.3';
                        package: 'SharedPool-Speech' with: 'SharedPool-Speech-dtl.2';
                        package: 'Balloon-Engine-Pools' with: 'Balloon-Engine-Pools-JB.2';
                        package: 'Alien-Core' with: 'Alien-Core-IgorStasenko.68';
                        package: 'Sound' with: 'Sound-StephaneDucasse.62';
                        package: 'VMConstruction-Plugins-OSProcessPlugin'
                                with: 'VMConstruction-Plugins-OSProcessPlugin.oscog-eem.31';
                        package: 'Freetype-Plugin' with: 'Freetype-Plugin-IgorStasenko.61';
                        package: 'ObjectiveC-Plugin' with: 'ObjectiveC-Plugin-John M McIntosh.20';
                        package: 'Cog' with: 'Cog-eem.45';
                        package: 'VMMaker-oscog' with: 'VMMaker-oscog-IgorStasenko.122';
                        package: 'Qwaq-VMProfiling-Plugins' with: 'Qwaq-VMProfiling-Plugins-JB.5';
                        package: 'Applescript-Core' with: 'Applescript-Core-SeanDeNigris.2';
                        package: 'CMakeVMMaker' with: 'CMakeVMMaker-IgorStasenko.136' ].

but i think we can deal with it nicely.

Anyways, i think we should consider splitting VMMaker, because it goes nowhere.

For Cog VMMaker , i think we could remove an Interpreter class, which
can make a package like 20% smaller, without any need of refactoring
and dependency rewiring.


--
Best regards,
Igor Stasenko AKA sig.
Reply | Threaded
Open this post in threaded view
|

Re: Why MC when you copying a package doing too much things?

Colin Putney-3

On Tue, Aug 30, 2011 at 11:01 AM, Igor Stasenko <[hidden email]> wrote:
>
> If you look how MC copies package from remote repository to
> package-cache dir, you will find out ,
> that it:
>  - reads and parses all definitions from source package
>  - and then writes all these definitions into a new file
>
> while instead it could just simply copy the contents of existing file
> to the directory and that's it.

In the general case, that's what you need to do, because not all
repositories store versions in files. Obviously this could be
optimized for file-repository-to-file-repository copies; nobody has
done so yet.