Yes, I realized that right when I posted.  I've now moved my web server to 
another host on the same network and did some more timing, what I get is:

creating Database Pool took : 560 milliseconds
acquiring first connection from Pool took : 820 milliseconds
registering classes tool : 46260 milliseconds

and I can see from that that perhaps I'm registering too many classes. 
 I'll have to evaluate my domain jar and see if there is a way to optimize 
that.  
Still it seems like 1/2 a second for pool creation and .820 seconds for 
acquiring the first connection seems a bit much to me.

Also, in light of the sizable hit for registering classes, is there a way 
to move the registration of domain jar to the server itself. Perhaps in a 
plugin or dropped into the lib directory?





On Thursday, December 22, 2016 at 1:00:41 PM UTC-8, Roberto Franchini wrote:
>
>
>
> On Thu, 22 Dec 2016 at 20:33 Gregory Mace <mace...@gmail.com <javascript:>> 
> wrote:
>
>> I'm using this code:
>>
>>
>>
>>
>> String orientUrlFormat = "remote:%s/%s";
>>
>>
>> try {
>>
>>
>>     long start = Calendar.getInstance().getTimeInMillis();
>>     String url = String.format(orientUrlFormat, host, db);
>>     oPartitionedDatabasePool = new OPartitionedDatabasePool(url, username, 
>> password);
>>     OObjectDatabaseTx db = new 
>> OObjectDatabaseTx(oPartitionedDatabasePool.acquire());
>>     // REGISTER THE CLASS ONLY ONCE AFTER THE DB POOL IS CREATED
>>     db.getEntityManager().registerEntityClasses("com.blablabla.domain");
>>     long end = Calendar.getInstance().getTimeInMillis();
>>     System.out.println("creating Database Pool tool : "+(end-start)+" 
>> milliseconds");
>>     initialized = true;
>>
>> } catch (Exception e ) { ...
>>
>>
>>
>>
>> and the result:
>>
>> creating Database Pool tool : 18341 milliseconds 
>>
>> the database is on the localhost. It seems quick enough after the pool is 
>> created.
>>
>>
> You're even measure the time to register the classes. 
> How many classes are there in the package? 
> Can you measure only the pool creation?
> Or at least take two measures, pool creation and class registration
>
>  
> -- 
> Best regards,
>  
> Roberto Franchini
>
> OrientDB LTD  -  http://orientdb.com
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to