|
From: <php...@li...> - 2007-08-08 04:11:04
|
Thanks Jost! > then it is better to use a local URL. For example: Converting HTTP to LOCAL URL did the trick. It runs a lot faster now, from 16 seconds, it's down to 0-4 seconds. That's good enough considering that ordinary Wiki pages that do not use PHP-Java Bridge sometimes take up to 3 seconds to load. > I assume that is what java_reset() does(?). Yes. It clears the loader cache, which means that the dynamic loader must load the classes again and again. I am just curious... just how much memory does the loader cache use up? Can I change its value in some config file? > java_reset()? Maybe, from an old local copy of some > website? It was documented in java.c, which doesn't exist anymore. But AFAIK the documentation contained a warning that java_reset() should never be used in user scripts. The next thing I'd like to do is migrate code from my test environment (Windows XP) to a production environment (Debian Linux). Before anything else, I'd like to know if this is the still the right place to ask questions on Debian installation or is there a more specialized mailing list for this? I was using 3.1.x J2EE(?) for Windows XP because of the good tutorial site I mentioned in my last email. I noticed there is no equivalent version for Debian. Instead there is a 4.x J2EE *.DEB file. This should work just as well, shouldn't it? Aside from the INSTALL.LINUX readme file inside the archive file for Debian, where else can I find instructions/tutorials on installing on Debian? Regards, Filip php...@li... wrote: Send php-java-bridge-users mailing list submissions to php...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users or, via email, send a message with subject or body 'help' to php...@li... You can reach the person managing the list at php...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of php-java-bridge-users digest..." Today's Topics: 1. Re: Speeding up PHP-Java Bridge code (php...@li...) 2. Re: Speeding up PHP-Java Bridge code (php...@li...) 3. Re: How do I configure javaBridge.war to work with tomcat and php isapi? (php...@li...) 4. Re: How do I configure javaBridge.war to work with tomcat and php isapi? (php...@li...) 5. fail to build from CVS (php...@li...) 6. Re: fail to build from CVS (php...@li...) 7. Re: fail to build from CVS (php...@li...) 8. php-cgi processes persist until server restart (php...@li...) ---------------------------------------------------------------------- Message: 1 Date: Fri, 3 Aug 2007 06:55:11 +0100 (BST) From: php...@li... Subject: Re: [Php-java-bridge-users] Speeding up PHP-Java Bridge code To: php...@li... Message-ID: <102...@we...> Content-Type: text/plain; charset=iso-8859-1 Hi Jost! > the code pulls the java libraries from a remote > server... Fetching jar files from a HTTP url is > expensive,especially if you don't allow the bridge > to cache them. Actually, the jar files are not in a remote server. They are in my PC which I am using as both server and client. For some reason, the simple syntax below would not work: java_require("myJarFile1.jar;myJarFile2.jar;..."); That is why I switched to using HTTP urls. Hmmm... could it be (another) Java classpath problem? All the jar files inside java_require() should be in my Java classpath right? >Furthermore you remove all cached libraries at the >end of the script, probably to emulate the dynamic >behaviour which is switched off for remote URL's. I assume that is what java_reset() does(?). I think I did this because sometimes my Wiki runs sluggishly after I visit a page that invokes PHP-Java Bridge. That is true, even if the next pages I view do not use PHP-Java Bridge anymore. Hmmm... okay, I'll try your suggestions and hope that fixes the problem. I wonder where I got java_reset()? Maybe, from an old local copy of some website? Regards, Filip Send instant messages to your online friends http://uk.messenger.yahoo.com ------------------------------ Message: 2 Date: Sat, 4 Aug 2007 18:03:23 +0200 (CEST) From: php...@li... Subject: Re: [Php-java-bridge-users] Speeding up PHP-Java Bridge code To: php...@li... Message-ID: <601...@we...> Content-Type: text/plain; charset=iso-8859-1 Hi Filip, > Actually, the jar files are not in a remote server. then it is better to use a local URL. For example: $here=getcwd(); java_require("$here/jar1.jar;$here/jar2.jar;..."); > could it be (another) Java classpath problem? All the I don't think so. > jar files inside java_require() should be in my Java > classpath right? No. -- Forget about the java classpath, this is an insane concept. Please use the jar repository or java_require() instead. > I assume that is what java_reset() does(?). Yes. It clears the loader cache, which means that the dynamic loader must load the classes again and again. > did this because sometimes my Wiki runs sluggishly > after I visit a page that invokes PHP-Java Bridge. > That is true, even if the next pages I view do not use > PHP-Java Bridge anymore. Interesting. Java runs as a separate process. The only common resource used by both processes is memory. Or this is a placebo effect. > java_reset()? Maybe, from an old local copy of some > website? It was documented in java.c, which doesn't exist anymore. But AFAIK the documentation contained a warning that java_reset() should never be used in user scripts. If you have still performance problems please open a new ticket and add a echo java("java.lang.System")->currentTimeMillis(); to the beginning and the end of the script. Regards, Jost Boekemeier Send instant messages to your online friends http://uk.messenger.yahoo.com |