Page 1 of 3

Posted: Tue 15 Jan 2013, 23:48
by jpeps
01micko wrote:Fixed in JWM-653 :) .. now I can try your programs :)
damn....you're my hero :)

works!

Posted: Fri 18 Jan 2013, 06:32
by jpeps
Updated the sort editor with a line number sort; parses out and sorts numbers at the beginning of a line, eliminates blank lines, sorts non-numeric lines after the number lines, etc. The alphanumeric sort orders numbers 1-9 and then places 10 after 1.

Interesting thing about java, is that you build the function in a separate, reusable class which can then be used by other projects.

Posted: Sat 02 Feb 2013, 18:35
by jpeps
Updated working jre to latest security patch (on first page)

Posted: Sat 02 Feb 2013, 20:33
by 01micko
jpeps wrote:Updated working jre to latest security patch (on first page)
Thanks for that. By chance do you have a build script for java? Kind of a tarball to sfs thing?

Posted: Sun 03 Feb 2013, 01:17
by jpeps
01micko wrote:
jpeps wrote:Updated working jre to latest security patch (on first page)
Thanks for that. By chance do you have a build script for java? Kind of a tarball to sfs thing?
It was a little tricky getting the link to work.

Code: Select all

#!/bin/sh

jre="jre1.7.0_17"
temp="jre1.7.0_17_001"

mkdir -p "/tmp/${temp}/usr/local/bin"
mkdir -p "/usr/local/${jre}/bin"

##  GET PACKAGE
wget -O "/tmp/${jre}.tar.gz"  http://javadl.sun.com/webapps/download/AutoDL?BundleId=75250


## UNPACK AND MOVE TO NEW FOLDER
cd /tmp
tar -xvzf "/tmp/${jre}.tar.gz"
 mv  "${jre}"    "${temp}/usr/local"

 
## COPY JAVA FILES FOR LINKING

cd "${temp}/usr/local"
cp   "${jre}/bin/java"  "/usr/local/${jre}/bin"     

cd "/tmp/${temp}/usr/local/bin"
ln -s "/usr/local/${jre}/bin/java" . 


## CHANGE NAME FOR SFS BUILD
cd /tmp
mv "${temp}" "${jre}"

dir2sfs "$jre"

## Change name and CLEAN UP
 
name="$(ls | grep jre1*sfs | grep -v "txt")"

mv "$name"  jre1-7.0-17.sfs

rm -r "/usr/local/${jre}"
rm -r "/tmp/${jre}"
rm  "/tmp/${jre}.tar.gz"
rm /tmp/jre1*txt

echo  "jre1-7.0-17.sfs is in /tmp"








Posted: Sun 03 Feb 2013, 03:01
by starhawk
sunburnt wrote:<snip>

Android is nearly a tablet + desktop O.S. ( amigo called it an interface ).
I`m thinking that making it desktop capable would kill Linux and Weeners.
I know I'm a little late to be commenting on this particular post... but...

http://www.android-x86.org/

;)

It only works on a limited range of computers right now, though...

Java

Posted: Mon 04 Feb 2013, 07:39
by Monsie
jpeps wrote:I was able to knock 63% off use of RAM with -Xmxn option (n=size). 2m is minimum.

example: in ROX, set run action to:
java -Xmx2m -jar "$@"
Does this tweak only work with certain Java packages? I have Java 1.6.0_33 in Wary Puppy. I modified the application_x-jar script in: /etc/xdg/rox.sourceforge.net/MIME-types with the run action tweak, then ran one of my favorite Java utility programs and I was not able to find any noticeable difference in memory usage at all.

Code: Select all

pmap -x process id
(where process id is the number assigned to the application in Pprocess) showed no significant change in how much memory my Java utility was using. Maybe I am missing something here and/or not understanding the procedure.

Monsie

Re: Java

Posted: Mon 04 Feb 2013, 08:48
by jpeps
Monsie wrote:[

Does this tweak only work with certain Java packages? I have Java 1.6.0_33 in Wary Puppy.
I'm running version 1.7.0_13 (you might as well update...you can run the script). Try running from the terminal, comparing with top -n1. On my sort editor, it loads with 378m with just java -jar. With 20m tweak, it loads with 143m, and with 2m tweak, 129m. It you tweak it too much for the app, it won't run. It it loads with only 2m, you should see a big difference.

Java

Posted: Thu 07 Feb 2013, 09:09
by Monsie
Thanks, jpeps

Just to let you know that I downloaded your latest Java runtime package, moved it to /mnt/home, however it did not show up in BootManager and so I was not able to load it. The checksum for the download was fine. I tried re-naming the file, thinking that BootManager was filtering the entry for some reason, but no luck there...

Subsequently, I downloaded jre version 1.7.0_13 that TheAsterisk! put together right here and it showed up in BootManager, so I was able to load the package, reboot and run one of my Java apps just fine... In fact, so far I have found that one of my Java programs uses 28 mb less memory without your tweak --an improvement of 11% so it appears that Java 1.7x runs much more efficiently. :)

Anyway, if you can think of any changes to make regarding your Java package (either on your part or mine), I am willing to test it again to see if it will load for me.

Monsie

Posted: Thu 07 Feb 2013, 11:20
by 01micko
Monsie

try renaming jpep's jre sfs package adding a hyphen after jre .. bootmanager might be choking on that...

Posted: Thu 07 Feb 2013, 16:59
by jpeps
01micko wrote:Monsie

try renaming jpep's jre sfs package adding a hyphen after jre .. bootmanager might be choking on that...


...changed the name; I didn't realize that was a convention.

edit: patched the build script

Java

Posted: Fri 08 Feb 2013, 07:42
by Monsie
jpeps wrote:
01micko wrote:Monsie

try renaming jpep's jre sfs package adding a hyphen after jre .. bootmanager might be choking on that...


...changed the name; I didn't realize that was a convention.

edit: patched the build script
Yes, I already tried Mick's suggestion when re-naming the Java package, but it didn't work... Then I had a new idea, and also replaced the underscores in the file name... and that did work :)

The interesting thing I noticed is that the devx package has underscores in its name, as does Wary's main package. So, I can see how one might think it's okay to include underscores in third party packages... but apparently not. I am guessing that BarryK made a rule such that BootManager recognizes files with underscores in the name if those files are legitimate operating system packages. There must be a good reason for this, but as to why I can only speculate...

Monsie

Posted: Fri 08 Feb 2013, 08:17
by jpeps
Ah..thanks Monsie. I have other packages with underscores as well, besides the devx. I'm guessing you're not using SFS-on-the-Fly, or is it distro dependent? I'll rename again. Did you get the cache limiting option working?

Java

Posted: Sat 09 Feb 2013, 09:00
by Monsie
jpeps wrote:Ah..thanks Monsie. I have other packages with underscores as well, besides the devx. I'm guessing you're not using SFS-on-the-Fly, or is it distro dependent? I'll rename again. Did you get the cache limiting option working?
I have not tried Shinobar's SFS load on the fly, but I am fairly sure that it works with Wary. If I get back to doing a full install of Puppy, I will probably test it. Do you know if Shino's program is subject to the same limitations with file names as BootManager or will it accept any package with an underscore in the name?

As for your tweak, I tested it on my favorite Java program and was only able to see a reduction in memory usage of 1 mb... However, this application was written for Java 1.4 and therefore might not be able to take full advantage of the tweak. Still, I was happy to see that it ran more efficiently with the new JRE anyway, as I noted in an earlier post.

Monsie

Re: Java

Posted: Sat 09 Feb 2013, 17:26
by jpeps
Monsie wrote: I have not tried Shinobar's SFS load on the fly, but I am fairly sure that it works with Wary. If I get back to doing a full install of Puppy, I will probably test it. Do you know if Shino's program is subject to the same limitations with file names as BootManager or will it accept any package with an underscore in the name?
I don't know if this is unique to Wary, since this was the first I've heard of a Puppy.distro refusing to load underscores.
As for your tweak, I tested it on my favorite Java program and was only able to see a reduction in memory usage of 1 mb... However, this application was written for Java 1.4 and therefore might not be able to take full advantage of the tweak. Still, I was happy to see that it ran more efficiently with the new JRE anyway, as I noted in an earlier post.

Monsie
That's also strange, since it's a standard Java option. Does it work with other java apps? You could try it on posted Sort Editor.

Java

Posted: Sun 10 Feb 2013, 07:51
by Monsie
Hi jpeps,

Well, I did some more testing... I downloaded MyLibrary.jar and started playing with that, when it dawned on me that I had been tweaking the wrong script file for Java applications...:oops: I had been editing the application_x-jar script, when I should have been looking at the application_x-java-archive script. So, once I got that sorted out, I tested the tweak on your app and achieved a 41.5% reduction in memory usage with the minimum adjustment @ -Xmx2m :D

Then I tested my old, but favorite Java application. Unfortunately the tweak did not work... even at minimum setting. It was kind of weird in that the program would open, but all I got was the window, frame, a couple of buttons, but the rest of the interface was missing. I checked the MANIFEST file, and it turns out that it was created with Java-1.5. and not Java 1.4 like I thought originally. So then... I tested another Java app which did turn out to be version 1.4 and it worked with the tweak... --go figure.

At the very least, I now know that the tweak does not depend on a particular version of Java.... more likely it has to do with the quality of the code.

Monsie

Re: Java

Posted: Sun 10 Feb 2013, 08:33
by jpeps
Monsie wrote: At the very least, I now know that the tweak does not depend on a particular version of Java.... more likely it has to do with the quality of the code.

Monsie
I'm guessing that the app required more cache than you were allowing it.

Re: Java

Posted: Sun 10 Feb 2013, 20:19
by Monsie
jpeps wrote:
Monsie wrote: At the very least, I now know that the tweak does not depend on a particular version of Java.... more likely it has to do with the quality of the code.

Monsie
I'm guessing that the app required more cache than you were allowing it.
Yes, well I did try several adjustments in 1 mb increments, but each time I got the same result.

For the record, the Java program I am talking about is Character Map which I find very useful in Puppy at times. You can download it at: http://www.psc-consulting.ca/fenske/

Monsie

Re: Java

Posted: Sun 10 Feb 2013, 22:03
by jpeps
Monsie wrote:[

Yes, well I did try several adjustments in 1 mb increments, but each time I got the same result.

For the record, the Java program I am talking about is Character Map which I find very useful in Puppy at times. You can download it at: http://www.psc-consulting.ca/fenske/

Monsie
CharMap ran with a 15M tweak at 140M, and at 379M without. I'm not sure why it's not working on your Wary distro. Did you run it from the terminal to see if anything else is going on?

There's another app, Acento, that does something similar:
http://java-apps.org/

Re: Java

Posted: Sun 10 Feb 2013, 22:40
by Monsie
jpeps wrote:
Monsie wrote:[

Yes, well I did try several adjustments in 1 mb increments, but each time I got the same result.

For the record, the Java program I am talking about is Character Map which I find very useful in Puppy at times. You can download it at: http://www.psc-consulting.ca/fenske/

Monsie
CharMap ran with a 15M tweak at 140M, and at 379M without. I'm not sure why it's not working on your Wary distro. Did you run it from the terminal to see if anything else is going on?

There's another app, Acento, that does something similar:
http://java-apps.org/
It worked! First, I tried the 15M tweak, and found that it opened properly... but that it was still using the same amount of memory as if no adjustment had been made. Then I bumped it to 16M and saw a drop of 81 mb 8) Wow... thanks for all of your help. :)

PS It would be interesting and useful to know the parameters of the tweak... so as to have an idea as to which values to try first. This way, one might not give up too quickly, as I did after having tried 2m - 8m values initially.

Monsie