> Hello! > > I just wanted to know if somebody has a straight answer. I'm > using JBoss 3.0 > alpha with CMP 2.0. > > The first time I reference let's say 10 Entity Beans after a > JBoss restart it > takes approx. 5 seconds to retrieve data from them. The > second and subsequent > requests to return data from the same 10 EBs take ~20ms. If I > later request > data from some other 10 EBs for the first time it takes > another 5 seconds. > I'm using commit option B. I watched the SQL that gets sent > to database > (using Sybase's "ribo") and it is the same SQL sequence for > the 1st time as > for the 2nd and subsequent requests, so this overhead is not from the > database. > > I'm just curious what takes it so long (1/2 second for an EB) > the first time > the EB's data is referenced. Is this the time it takes to > create new instance > in the pool of EBs? Will this overhead go away after some > time of running > when the number of instances reaches the pool's limit? > > What I wanted to know is what is happening behind the scenes > (I read from > time to time on this list about dynamic bytecode generation > and similar but I > thought this was only used to create Proxies...). >
I was curious also, so I re-ran my test. The second run always takes slightly less time ~1-2 sec. The only thing I can think of that is different in the first execution is the bytecode generator. On my machine, a 1.4 athalon, it doesn't take anywhere 1/2 second per bean. I really haven't been focusing on this type of optimization, but I can easily add a line to the init or start method that creates an instance of the bean. Then it will only happen during setup. I look at it after the example code done (later today). -dain _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development