This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Can't install scala 2.9 - installer is too slow

10 replies
Marcin Wiśnicki
Joined: 2009-11-11,
User offline. Last seen 42 years 45 weeks ago.

Hi,

I'm trying to install scala using scala-2.9.0.final-installer.jar on
Windows7/x64 with JRE6u24/x86.

Unfortunately extraction speed is extremely slow - about 1 file per 2
seconds. At that speed it would take about an hour or two to install.

Is anyone else seeing this behaviour ?

Randall R Schulz
Joined: 2008-12-16,
User offline. Last seen 1 year 29 weeks ago.
Re: Can't install scala 2.9 - installer is too slow

On Monday May 23 2011, Marcin Wiśnicki wrote:
> Hi,
>
> I'm trying to install scala using scala-2.9.0.final-installer.jar on
> Windows7/x64 with JRE6u24/x86.
>
> Unfortunately extraction speed is extremely slow - about 1 file per 2
> seconds. At that speed it would take about an hour or two to install.
>
> Is anyone else seeing this behaviour ?

It has always been like that except:

1) Never that bad (for me).
2) The 2.9 one did _not_ exhibit this.
I figured they'd fixed whatever it was.

My hunch was always that there's some sort of iterative process
happening for each file extracted with N iterations where N is the
ordinal of the file being retrieved (since it gets progressivly slower
as extraction proceeds). That is quadratic in the total number of files
extracted.

Randall Schulz

Marcin Wiśnicki
Joined: 2009-11-11,
User offline. Last seen 42 years 45 weeks ago.
Re: Can't install scala 2.9 - installer is too slow

On Mon, 23 May 2011 06:10:38 -0700, Randall R Schulz wrote:

> My hunch was always that there's some sort of iterative process
> happening for each file extracted with N iterations where N is the
> ordinal of the file being retrieved (since it gets progressivly slower
> as extraction proceeds). That is quadratic in the total number of files
> extracted.

Yes, in Process Monitor (procmon) I can observe that java process
constantly re-reads whole scala-2.9.0.final-installer.jar file from offset
0 till the end. Judging by cpu activity (one core is maxed out) it also
has to uncompress it with every such read.

To fix this I have repacked installer jar without compression and now it
is very fast (just a few seconds).

I guess izpack should be fixed to unpack itself only one time.

I wonder though why nobody else is seeing/reporting this problem - google
(izpack+slow) gives no interesting and recent results.

Philippe Lhoste
Joined: 2010-09-02,
User offline. Last seen 42 years 45 weeks ago.
Re: Can't install scala 2.9 - installer is too slow

On 23/05/2011 16:18, Marcin Wiśnicki wrote:
> Yes, in Process Monitor (procmon) I can observe that java process
> constantly re-reads whole scala-2.9.0.final-installer.jar file from offset
> 0 till the end. Judging by cpu activity (one core is maxed out) it also
> has to uncompress it with every such read.

Perhaps they used the trick to do make a solid archive, ie. a first pass with store (no
compression) and a second one with compression. Somebody mentioned the trick recently (to
distribute applications after ProGuard) and somebody else mentioned the drawback of having
to read the whole archive for each extracted file (or to unzip all the archive all at
once, I suppose).

Out of curiosity, why is there an installer?
I just download the zip archive, uncompress it and here I go.

OK, I made my own custom .reg file to make proper file associations, but that's not rocket
science.

Is there anything other making this installer worth using?

Dinesh V
Joined: 2010-11-17,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: Can't install scala 2.9 - installer is too slow



OK, I made my own custom .reg file to make proper file associations, but that's not rocket science.

Philippe Lhoste

Philippe,   Sorry to say this, but, messing with registry is *rocket science* Not something I want to do, unless, I absolutely have to.   The installer is necessary.
--
Regards,
Dinesh V
Kevin Wright 2
Joined: 2010-05-30,
User offline. Last seen 26 weeks 4 days ago.
Re: Re: Can't install scala 2.9 - installer is too slow
Why does the registry need touching to install what is, essentially, a Java library?
The only possibility that I can think of is to add the Scala binaries to the path, which isn't rocket science - however it's done.


On 23 May 2011 17:29, Dinesh V <viswad [at] gmail [dot] com> wrote:



OK, I made my own custom .reg file to make proper file associations, but that's not rocket science.

Philippe Lhoste

Philippe,   Sorry to say this, but, messing with registry is *rocket science* Not something I want to do, unless, I absolutely have to.   The installer is necessary.
--
Regards,
Dinesh V



--
Kevin Wright

gtalk / msn : kev [dot] lee [dot] wright [at] gmail [dot] comkev [dot] lee [dot] wright [at] gmail [dot] commail: kevin [dot] wright [at] scalatechnology [dot] com
vibe / skype: kev.lee.wrightquora: http://www.quora.com/Kevin-Wright
twitter: @thecoda

"My point today is that, if we wish to count lines of code, we should not regard them as "lines produced" but as "lines spent": the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger" ~ Dijkstra
Marcin Wiśnicki
Joined: 2009-11-11,
User offline. Last seen 42 years 45 weeks ago.
Re: Can't install scala 2.9 - installer is too slow

On Mon, 23 May 2011 18:19:15 +0200, Philippe Lhoste wrote:

> Out of curiosity, why is there an installer? I just download the zip
> archive, uncompress it and here I go.
>

I guess it's for lazy people like me.

> OK, I made my own custom .reg file to make proper file associations, but
> that's not rocket science.
>
> Is there anything other making this installer worth using?

IMHO it would be nice if zip distribution came with some registration
utility (setup.jar?) that would do whatever is normally done during
installation.

Philippe Lhoste
Joined: 2010-09-02,
User offline. Last seen 42 years 45 weeks ago.
Re: Can't install scala 2.9 - installer is too slow

On 23/05/2011 18:36, Kevin Wright wrote:
> Why does the registry need touching to install what is, essentially, a Java library?

Just self convenience: I associate a nice icon with the scala files, I can open the scala
files in my favorite editor by double-clicking them, I can create a new Scala file with
New > Scala File (not that I use that, though...), and some other goodies.

Nothing compelling, I suppose, and most of this can be done with Windows tools (which is
less familiar to me than the corresponding regedit syntax...).

Adding Scala to the path is another separate step (trivial).

One can take a look at http://bazaar.launchpad.net/~philho/+junk/Scala/files
There is the .reg file (need editing, the paths are hard-coded!), the .ico (various sizes
inside) I made out of the logo, my various puny Scala experiments (nothing interesting,
probably), the (unfinished, but usable) lexer I made for SciTE, a collection of links to
Scala articles and references, and so on.

Philippe Lhoste
Joined: 2010-09-02,
User offline. Last seen 42 years 45 weeks ago.
Re: Can't install scala 2.9 - installer is too slow

On 23/05/2011 21:26, Marcin Wiśnicki wrote:
> IMHO it would be nice if zip distribution came with some registration
> utility (setup.jar?) that would do whatever is normally done during
> installation.

Yes, some softwares just do that, allowing dynamic, post-unzipping, install / uninstall.
It would be safer and easier than my .reg file (where paths must be edited by hand) and
more complete (editing path...).
Now, it needs Java to access the Windows registry and some other internals. I suppose
there is a library for that, or some hacks (create the .reg, run it?).

Kevin Wright 2
Joined: 2010-05-30,
User offline. Last seen 26 weeks 4 days ago.
Re: Re: Can't install scala 2.9 - installer is too slow
If windows is to be seriously treated as a target platform, then an MSI installer has got to be the way to go.Presumably, built with something like WiX
Shouldn't be *too* hard for anyone with a bit of experience there!


On 24 May 2011 10:35, Philippe Lhoste <PhiLho [at] gmx [dot] net> wrote:
On 23/05/2011 21:26, Marcin Wiśnicki wrote:
IMHO it would be nice if zip distribution came with some registration
utility (setup.jar?) that would do whatever is normally done during
installation.

Yes, some softwares just do that, allowing dynamic, post-unzipping, install / uninstall.
It would be safer and easier than my .reg file (where paths must be edited by hand) and more complete (editing path...).
Now, it needs Java to access the Windows registry and some other internals. I suppose there is a library for that, or some hacks (create the .reg, run it?).

Fabrice
Joined: 2011-07-11,
User offline. Last seen 42 years 45 weeks ago.
Re: Can't install scala 2.9 - installer is too slow

Marcin Wiśnicki gmail.com> writes:
> I guess izpack should be fixed to unpack itself only one time.
>
> I wonder though why nobody else is seeing/reporting this problem - google
> (izpack+slow) gives no interesting and recent results.
>

Hi,

I got the same issue with scala-2.9.0.1-installer.jar on Windows.

In order to avoid a more than 2 hours install and get instead a few seconds
install, I had to use the same workaround (repack the jar without compression.
Thanks Marcin).

So I also think izpack should be fixed to unpack itself only one time.

Cheers,
Fabrice

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland