From: thhal at mailblocks.com (Thomas Hallgren) Date: Sat, 07 May 2005 16:46:18 +0200 Subject: [Pljava-dev] Re: preload_libraries and pljava In-Reply-To: <427CB497.70502@lewczuk.com> References: <427C99C2.70703@mailblocks.com> <427CB497.70502@lewczuk.com> <427CD4BA.7010305@mailblocks.com> Message-ID: Marek Lewczuk wrote: > Thomas Hallgren napisa?(a): > >> Marek Lewczuk wrote: > > >> Sure, the pljava can be pre-loaded just like any other module. There >> is no particular initialization function though since PL/Java is >> initialized when the first call arrives so don't use a ':' in the >> preload entry for pljava. > > It's working... however I don't see any performance improvments. I have > this problem with all procedural languages - executing first functions > takes about a 1 second. Is there any other solution to make pljava > runs faster in first execution ? No, not really. PL/Java must initialize a Java VM at some point before the first call is processed. That will inevitably take some time. A connection pool that enables connection reuse is generally the best solution. PL/Java is not designed to perform well when connections are frequently dropped and re-established. Regards, Thomas Hallgren