LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   why do windows applications start faster? (https://www.linuxquestions.org/questions/linux-software-2/why-do-windows-applications-start-faster-781809/)

rabbit2345 01-12-2010 05:17 PM

why do windows applications start faster?
 
Hi,

I noticed that on Linux, applications are much, much smaller but they take forever to start sometimes (namely, OpenOffice). However, MS Office starts up super fast, but I see it is huge (it needs 2GB to install).


Is there a trade-off between size and start time? If so, is it possible to "enlarge" some of my programs so they would start faster? I have plenty of unused disk space, and a few larger programs wouldn't really hurt.


thanks,

rabbit2345

lupusarcanus 01-12-2010 05:26 PM

I'm certain that a bigger application does not load faster. Usually it's the smaller one that loads faster.

The reason you are experiencing this is can be because of many reasons.

Primarily it is because of hardware, distribution, window manager, desktop environment, physical location on the disc.

jefro 01-12-2010 05:33 PM

MS has thousands of people working on it day in and day out for years. They have all sorts of inside information on hardware and firmware and software that linux writers do not have legal access to.


While OO is a result of Sun's work it was an odd deal to start so it continues to be not a closely tied to an OS as a MS product would. As I recall, OO was intended to be a write once run anywhere deal. I think along the line of Java or even mostly based on java originally.

Once OO is opened I think it runs rather well. In fact the latest version of OO is quite snappy.

repo 01-12-2010 05:36 PM

Quote:

If so, is it possible to "enlarge" some of my programs so they would start faster? I have plenty of unused disk space, and a few larger programs wouldn't really hurt.
http://www.zolved.com/synapse/view_c...ster_in_Ubuntu

GrapefruiTgirl 01-12-2010 05:54 PM

Should also be noted that, after having installed <application> into Windows, <application> becomes another bunch of code that is now "integrated into"(1) or "combined with"(2) or "hopelessly entangled with"(3) the Windows OS itself, which if you're lucky, is actually running, even if <application> is not yet started by the user.

Therefore, whether or not the user has deliberately started a given <application>, there's probably some portion of it already running most of the time anyway, whether the user knows it or not; so, opting to start <application> in reality is just bringing some already-running chunk of code to the foreground, filling all available memory with it, and presenting a GUI for it.

With Linux, installing an <application> means it gets "installed"(4) -- period! It doesn't get entangled with, or become "part of" the rest of the OS, and almost certainly doesn't start running instantly all by itself. Therefore, asking it to start up involves actually "starting" the application from a dead stop-- quite possibly a slightly slower process than if a bunch of it were already running in the background.

(1-4):
Evidence of (1), (2), and (3) can be had by trying to kill and/or un-install many Windows <applications>. It's difficult at times, and other times (somewhat rarely) impossible. Sometimes, forcing some <application> to remove itself breaks the OS. Most of the time, a reboot is needed.

(4) can be proven by simply uninstalling any Linux <application> -- just uninstall it, and it's gone! Completely! (Unless there's some package-manager error or uncommon problem). No reboot, no crash, no fighting with it. Quite easy and pleasant :)

Cheers!
Sasha

lupusarcanus 01-12-2010 06:08 PM

Quote:

Originally Posted by GrapefruiTgirl (Post 3824402)
Should also be noted that, after having installed <application> into Windows, <application> becomes another bunch of code that is now "integrated into"(1) or "combined with"(2) or "hopelessly entangled with"(3) the Windows OS itself, which if you're lucky, is actually running, even if <application> is not yet started by the user.

Therefore, whether or not the user has deliberately started a given <application>, there's probably some portion of it already running most of the time anyway, whether the user knows it or not; so, opting to start <application> in reality is just bringing some already-running chunk of code to the foreground, filling all available memory with it, and presenting a GUI for it.

With Linux, installing an <application> means it gets "installed"(4) -- period! It doesn't get entangled with, or become "part of" the rest of the OS, and almost certainly doesn't start running instantly all by itself. Therefore, asking it to start up involves actually "starting" the application from a dead stop-- quite possibly a slightly slower process than if a bunch of it were already running in the background.

(1-4):
Evidence of (1), (2), and (3) can be had by trying to kill and/or un-install many Windows <applications>. It's difficult at times, and other times (somewhat rarely) impossible. Sometimes, forcing some <application> to remove itself breaks the OS. Most of the time, a reboot is needed.

(4) can be proven by simply uninstalling any Linux <application> -- just uninstall it, and it's gone! Completely! (Unless there's some package-manager error or uncommon problem). No reboot, no crash, no fighting with it. Quite easy and pleasant :)

Cheers!
Sasha

She is right.

Although uninstalling a Windows program isn't all too hard. Just edit the Registry and browse the C:\ for <application> name and it's connected .dlls.

Still a lot more complicated than GNU/Linux. Really simple on GNU/Linux.

jlinkels 01-12-2010 06:52 PM

All programs load slower in Linux, not just OO.

I think the correct answer is that applications in Linux are being linked dynamically at the moment they are started.

Windows applications use another mechanisms. It is said that during booting Windows pre-links all applications so they flash onto the screen when started. I have no confirmation of that, although Windows is notorious for starting slower each time you have more applications installed. Linux OTOH starts as fast regardless of the applications installed (I said applications, not services etc), and after 4 years it starts exactly as fast as initially.

When take the time to start applications at boot time and minimize then, you'll notice that that after this your programs pop up almost as fast as in Windows.

As for specifically starting OO vs MsOffice, this cannot be a matter of better integration etc. MsOffice (2000) starts up instantly. I mean instant, one moment you click the button, the next moment it is there. OO takes about 20 seconds on the same machine. (Windows runs in a Virtual Machine) Those differences are a 100-fold or so and cannot be explained as integration.

jlinkels

rabbit2345 01-12-2010 08:42 PM

So when you install something in Windows, it just "morphs" into the whole OS? Is that not kinda dangerous since an unstable program could take the whole system down? Odd.


I read about this program called "prelink". it seems it helps stuff start faster, but I'm not sure how it does it or how to use it. How does prelink work? It says that it modifies the binaries, does it shrink or enlarge the binary?

thanks,
rabbit2345

craigevil 01-12-2010 10:03 PM

tweak it. :)

OpenOffice.org, Firefox, GIMP etc all start pretty much instantly here.

Google how to use preload and prelink.

From the man page for both:

preload is an adaptive readahead daemon that prefetches files mapped by applications from the disk to reduce application startup time.

prelink is a program that modifies ELF shared libraries and ELF dynamically linked binaries in such a way that the time needed for the dynamic linker to perform relocations at startup significantly decreases. Due to fewer relocations, the run-time memory consumption decreases as well (especially the number of unshareable pages). The prelinking information is only used at startup time if none of the dependent libraries have changed since prelinking; otherwise programs are relocated normally.

prelink first collects ELF binaries to be prelinked and all the ELF shared libraries they depend on. Then it assigns a unique virtual address space slot to each library and relinks the shared library to that base address. When the dynamic linker attempts to load such a library, unless that virtual address space slot is already occupied, it maps the library into the given slot. After this is done, prelink, with the help of dynamic linker, resolves all relocations in the binary or library against its dependent libraries and stores the relocations into the ELF object.
It also stores a list of all dependent libraries together with their checksums into the binary or library. For binaries, it also computes a list of conflicts (relocations that resolve differently in the binary's symbol search scope than in the smaller search scope in which the dependent library was resolved) and stores it into a special ELF section.

At runtime, the dynamic linker first checks whether all dependent libraries were successfully mapped into their designated address space slots and whether they have not changed since the prelinking was done. If all checks are successful, the dynamic linker just replays the list of conflicts (which is usually significantly shorter than total number of relocations) instead of relocating each library.

damgar 01-12-2010 10:31 PM

When I first installed Mandriva (first linux distro) I was surprised at how sluggish things were. Like you said everything just started SLOW. After playing around with various distros I've settled on Slackware for this machine, and it's at a minimum as fast as windows ever was and maybe faster. Further, I'm learning (very slowly) to be more at home in the terminal which is of course even faster.

So to say LINUX is sluggish isn't neccessarily 100% accurate. Then of course is the fact that I rarely reboot the machine, have more memory than I need, and tend to run the same 5 or 6 programs over and over (thus they're cached) and then my Slack install is much FASTER than windows ever was. Boot times are about the same, although Slack is useful instantly upon gui entry (I actually boot to runlevel 3, then startx) where windows always had to load various bits before it was up to speed, despite the fact I'd disabled everything non essential in msconfig.

That's my experience anyhow.


All times are GMT -5. The time now is 10:24 AM.