Jump to content


Photo

Pnd_Run.sh


  • Please log in to reply
65 replies to this topic

#1 sebt3

sebt3

    homebrew player (P. & C.)

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 1897 posts
  • Gender:Male
  • Location:QC

Posted 29 March 2011 - 01:49 AM

Hi there,

Last time with HF5, my change to pnd_run.sh introduced many regressions. For nexts OS releases, I want to come clean. So I decided to ask your help and built this installer.

Change since HF5 in pnd_run.sh :
- Rewrite the loging. Make it way nicer
- rewrite the argument parsing. Fixing the many differents space issues.
- support more than 9 loops (thanks vimacs)
- many code clean-ups
- support for user configured pre/post scripts (have to be in the appdata, will not be taken from the pnd. file have to be named PND_pre_script.sh and PND_post_script.sh)
- APPDATADIR is exported to the application, so launcher script can take adventage of it (I have already posted a backward compatible solution on the boards)
- PND (the name of the pnd file) is also exported to the application
- Wait up to 2 minuts that the app have effectivly left the union filesystem before attempting to unmount.
- if an error occur while mounting, retry once before giving up
- implemented a garbage collector for loopback.

[ installer ]
the install script will ask you for your password.
You old pnd_run.sh will be backuped.

tests and feedbacks encouraged ;)

Edited by sebt3, 29 March 2011 - 02:27 AM.


#2 meandu229

meandu229

    Zubeman

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 586 posts
  • Location:England(north east)
  • Interests:Everything and anything fun

Posted 30 March 2011 - 08:32 AM

This has made my pandora much much more stable
Thanks for your work

#3 xopher

xopher

    GP32 Hardcore

  • GP32 Hardcore
  • PipPipPipPip
  • 226 posts
  • Gender:Male
  • Location:Where I am

Posted 30 March 2011 - 11:53 AM

Thanks look forward to running this

#4 Jonney

Jonney

    Member

  • Members
  • PipPip
  • 2 posts

Posted 30 March 2011 - 01:05 PM

I;ve been testing the updated Pnd_Run.sh. It's working great. However, I've noticed that there is now 10 second or more delay for MeniMenu to reload after I exit a application. Is the delay intended?

#5 sebt3

sebt3

    homebrew player (P. & C.)

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 1897 posts
  • Gender:Male
  • Location:QC

Posted 30 March 2011 - 01:27 PM

I;ve been testing the updated Pnd_Run.sh. It's working great. However, I've noticed that there is now 10 second or more delay for MeniMenu to reload after I exit a application. Is the delay intended?

Not realy.
Is this for every apps ?
May I see a pndrun_*.out file of one app when this happen ?

#6 Zero3K

Zero3K

    GP Mania

  • GP32 Hardcore
  • PipPipPipPipPip
  • 348 posts
  • Gender:Male
  • Location:USA

Posted 30 March 2011 - 05:57 PM

Oh, one thing I've been noticing is that when I close an application, its icon on the desktop "blinks".

Edited by Zero3K, 30 March 2011 - 05:57 PM.


#7 Alerino

Alerino

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 1483 posts

Posted 30 March 2011 - 07:03 PM

i can confirm the blinking, but it happens with regular pnd_run.sh from HF5

#8 sebt3

sebt3

    homebrew player (P. & C.)

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 1897 posts
  • Gender:Male
  • Location:QC

Posted 30 March 2011 - 07:07 PM

i can confirm the blinking, but it happens with regular pnd_run.sh from HF5

Me too. Not sure it is related to this script though.

#9 Zero3K

Zero3K

    GP Mania

  • GP32 Hardcore
  • PipPipPipPipPip
  • 348 posts
  • Gender:Male
  • Location:USA

Posted 30 March 2011 - 07:56 PM

What else could it be though? I think its blinking because of the things that occur when unmounting the PND of that application.

#10 Esn

Esn

    (:\

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2758 posts
  • Gender:Male
  • Location:Toronto, Canada
  • Interests:Art, Classical Music, Biology, Fantasy/Sci-Fi (books, art, movies, games), Crosscountry skiing, adventuring to foreign parts, and of course, handheld gaming machines. ;)

Posted 30 March 2011 - 11:38 PM

I think the blinking is also probably related to why the start menu freezes for a few seconds after closing a program, since HF5.

Edited by Esn, 30 March 2011 - 11:38 PM.


#11 sebt3

sebt3

    homebrew player (P. & C.)

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 1897 posts
  • Gender:Male
  • Location:QC

Posted 31 March 2011 - 12:19 AM

I think the blinking is also probably related to why the start menu freezes for a few seconds after closing a program, since HF5.

Thanks, you got it : when pnd_run.sh un-mount the PND, the system send an event pndnotifyd catch as something to force a rescan.
You'll have your bug fixed if you send enough diapers to skeezix :D

#12 Jey123456

Jey123456

    Member

  • Members
  • PipPip
  • 16 posts

Posted 01 April 2011 - 05:13 PM

i noticed a much highest cpu usage with this pnd_run. for instance, if i run panplayer from a script started by midori 0.3, both pnd_run script rush up at 50% cpu each for 3-4 secs, then mplayer get about 30% cpu and pnd_run use 70% for about 15 more secs, then it stabilise down.

I reduced the output from those scripts that helped a lot, but even with about 0 lines outputed to pndrun_ i still get an uncanny cpu usage for a launching script. at the very least way more than with the older (less stable) script.

Edited by Jey123456, 01 April 2011 - 05:17 PM.


#13 sebt3

sebt3

    homebrew player (P. & C.)

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 1897 posts
  • Gender:Male
  • Location:QC

Posted 01 April 2011 - 05:30 PM

indeed, this version of pnd_run.sh does use a bit more cpu for each line written in the log (mostly for a awk, 2 sed, a date and a printf)
And it might have an impact on your application performance if it log a lot (aka several time per second).

When starting an app like abiword, pnd_run.sh dont use more then 1-2% of my CPU and not for long.
If pnd_run.sh is using CPU when your app is not logging, then there is a problem somewhere I cant get right now : both pnd_run.sh process are in wait (the 1st for the app to return, the second for the app to log something)

#14 Jey123456

Jey123456

    Member

  • Members
  • PipPip
  • 16 posts

Posted 01 April 2011 - 05:39 PM

alright, was hoping you would have a fair idea on the source, ill keep you posted on what i discover (ill spend a bit of time later today tracking that lag down ! )

#15 neurocyde

neurocyde

    Member

  • Members
  • PipPip
  • 2 posts

Posted 02 April 2011 - 11:42 AM

Hi there,

Last time with HF5, my change to pnd_run.sh introduced many regressions. For nexts OS releases, I want to come clean. So I decided to ask your help and built this installer.

Change since HF5 in pnd_run.sh :
- Rewrite the loging. Make it way nicer
- rewrite the argument parsing. Fixing the many differents space issues.
- support more than 9 loops (thanks vimacs)
- many code clean-ups
- support for user configured pre/post scripts (have to be in the appdata, will not be taken from the pnd. file have to be named PND_pre_script.sh and PND_post_script.sh)
- APPDATADIR is exported to the application, so launcher script can take adventage of it (I have already posted a backward compatible solution on the boards)
- PND (the name of the pnd file) is also exported to the application
- Wait up to 2 minuts that the app have effectivly left the union filesystem before attempting to unmount.
- if an error occur while mounting, retry once before giving up
- implemented a garbage collector for loopback.

[ installer ]
the install script will ask you for your password.
You old pnd_run.sh will be backuped.

tests and feedbacks encouraged ;)


Sebt3, Many thanks for this and the rest of your hard work.

however, I'm having problems with the new pnd_run.sh pnd...
when I first ran it, nothing happened - it didnt ask me for my password or similar, but it does seem to have done something... namely that every time i try to run an app as usual an error comes up from swfdec flash player saying that this isnt a flash file - for some reason, the new script seems to have changed the PND file association.

can you tell me where the backup pnd_run.sh is stored? or alternatively, does anyone have a working one they can send me?