You are here

Why 2 processes per 1 application while only 1 enough?

12 posts / 0 new
Last post
romb
Offline
Last seen: 13 years 11 months ago
Joined: 2010-04-20 13:40
Why 2 processes per 1 application while only 1 enough?

Hi guys & girls Smile

First, I have no idea about internals of the SDK.
Second, my questions might have been already asked, please excuse me and redirect me.

I've tried portable skype & pidgin. Hope I'm not the only who checked the processes in Task Manager (TM). And it's very strange that each X application has two own process: XPortable.exe (1) & X.exe (2). Obviously (1) launches (2). And it's the fact that (1) could be easily killed in TM: (2) continues running as usual.

So the question: why not to quit (1) process after (2) has been launched?

Reasons are quite obvious - to save RAM and ensure no spyware running (joke) Smile

Thanks
R

J Neutron
Offline
Last seen: 2 weeks 6 days ago
Joined: 2008-06-10 19:26
Housekeeping

Yes, the launcher does start the main program. However, that is not the only function it has. Depending on how intrusive (un-portable) the program is, the launcher waits for program termination and will clean up after it... undoing the registry entries it might make and moving configuration files it insists on writing to the local machine back onto the USB drive.

So if you kill the launcher process the portability goes out the window.

neutron1132 (at) usa (dot) com

Simeon
Simeon's picture
Offline
Last seen: 9 years 5 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
yes

some Launchers quit after launching the actual App because they arent needed any more but if they keep running there is usually a reason for that.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

romb
Offline
Last seen: 13 years 11 months ago
Joined: 2010-04-20 13:40
Just an idea, if we have the

Just an idea, if we have the same approach for all portable apps, and it's "copy-pasted" into all apps, could it be implemented only one win service, which will be responsible for watching and cleaning up all running portable apps?

If possible then it will make sense since more and people like portability and have more than one portable app on their devices. Having installed only one win service it may resolve the problem with 2N processes instead of N.

Thoughts?

dboki89
Offline
Last seen: 9 years 2 months ago
Joined: 2009-11-30 20:44
.

You mean 1 XXPortable.exe process for, lets say, 10 running portable applications, instead of current 10 XXPortable.exe instances for 10 running apps?.. Brilliant! Then, all it takes is 1 process to crash... Why hasn't someone thought of that sooner? Biggrin

Btw, I'm "being Darkbee" here...

I hope you realize that it's not such a good idea, at least IMO, to do what you ask. Mozilla is even trying to make firefox.exe have a separate process for each tab, in case of a crash...

My posts are old and likely no longer relevant.

scriptdaemon
Offline
Last seen: 4 years 4 months ago
Developer
Joined: 2008-10-10 17:40
They already have a separate

They already have a separate process (in beta) now for a plugin container.

Darkbee
Darkbee's picture
Offline
Last seen: 3 years 10 months ago
Joined: 2008-04-14 09:41
I saw that!

Oy! Stop taking my name in vain!

And how am I suppose to make sarcastic yet insightful comments on this thread now?

dboki89
Offline
Last seen: 9 years 2 months ago
Joined: 2009-11-30 20:44
.

@ romb: [...] and "Welcome to PortableApps"!

@ Darkbee: (everything else)
Sorry, I thought you wouldn't mind Blum
Also, the line was supposed to be like this:

Btw, I'm "being Darkbee" here... Blum

I don't know where the :P part went... Smile Glad you're here now. I haven't seen your ("Darkbee-ish") posts recently, which automatically reduced the fun factor of being here by about 75%... Ok, 50%... Ok, ok - about 10%! Happy? Biggrin

And how am I suppose to make sarcastic yet insightful comments on this thread now?

Well.... Comment on my signature, if all else fails. You're bound to get a sarcastic point on my hate towards Google "the spy agency" (hence I'm suggesting startpage [dot] com)... Anything? ...yet?... How about now? Smile
Take care, and don't take anything I wrote personally... or too seriously...

My posts are old and likely no longer relevant.

Darkbee
Darkbee's picture
Offline
Last seen: 3 years 10 months ago
Joined: 2008-04-14 09:41
Chillax Dude

dboki89Take care, and don't take anything I wrote personally... or too seriously...

I don't and I didn't. I was being sarcastic. Smile

I was on vacation for just over a week, hence no posts. Don't worry, normal services will resume.

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 8 years 9 months ago
Joined: 2007-04-15 21:08
Not enough

I'd say just what was said above - they're not portable unless they do things at the end, cleaning up, moving files back, registry things, etc. In short, one process is not enough.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

romb
Offline
Last seen: 13 years 11 months ago
Joined: 2010-04-20 13:40
Just an idea

As said it's just a proposal.

How often did you see crashed win services? I didn't remember. Think it depends on their design.

Here initialization/cleanup staff required, so XPortable.exe may be invoked from the service on app exit (e.g. subscriber pattern). If there is an error inside XPortable.exe, it shouldn't result in crashing the service. So XPortable.exe is required, but it runs only twice per X.exe lifecycle: on launch & on exit (and isn't running all the time).

One extra process is a price to pay for portability. Not all users may know that.

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 8 years 9 months ago
Joined: 2007-04-15 21:08
Not practical or reasonable

That's just not a practical or reasonable way of doing it. For starters, services require administrative privileges. Secondly, in case of power failure or similar a broken service tends to cause a little bit more trouble than a little bit of data. Also it would be very troublesome to keep track of all the different processes from portable apps, and it would actually be far less efficient than the current system, because you'd have to keep checking that a whole hoard of processes are still there rather than just latching on to one and waiting doing absolutely nothing until it's finished.

You say that one extra process is a price to pay for portability; I wouldn't call it a price at all. If you can't cope with an extra few megabytes of memory being used (and in the new PortableApps.com Launcher memory usage while waiting is down to a couple of hundred kilobytes, that will start coming for all our apps) then you probably don't have enough memory. An extra process is really nothing to worry about. Users don't need to know about it.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Log in or register to post comments