db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Sfeir <rob...@codepuccino.com>
Subject Re: Vector use
Date Mon, 14 Jun 2004 19:17:31 GMT
k.  Just getting an opinion before I pick through things.  I think we 
should DEFINITELY profile OJB after 1.0.  I don't intend to make any of 
these changes right now.  I've already told Brian that I think there 
are a few things that can be done, including removing Tail Recursions 
where possible for example, to improve performance.  Brian also knows 
I'm a performance freak, and pick at the little things.  So since I 
don't know OJB as well as everyone else does, and do what I can to 
contribute, I pick at performance analysis with the tools I currently 
have.

I've already suggested the use of final in a lot of places and ran some 
tests a while ago, and showed some serious drops in memory usage, but I 
think my patch was entirely too big for Brian to implement in one shot.

I just want OJB to completely smoke the competition in performance :-)

Thanks
R

On Jun 14, 2004, at 3:01 PM, Thomas Dudziak wrote:

> Robert Sfeir wrote:
>
>> I guess what bugs me the most about Vector is that it's synchronized, 
>> and while I am not extremely familiar with the code, there are some 
>> spots which look like we don't need synchronization, and we could 
>> benefit from the added performance.
>> The other thing is that since Vector has been retrofitted to 
>> implement Collection, when we have a line like:
>> private Vector foo = new Vector();
>> wouldn't it be better to use something like:
>> private List foo = new Vector();
>> or
>> private Collection foo = new Vector();
>> (Depending on the purpose of course being listed v/s non 
>> discriminatory)
>> which should allow us to support people using 1.2 + in any case, then 
>> we can change our implementation underneath as we go forward and not 
>> affect the code.  We can apply changes to the impl as we properly 
>> determine sync need v/s none, and choose a better Collection when we 
>> see the need.
>> Thoughts?
>>
>
> To be completely honest with you, usage of Vector and Hashtable 
> doesn't really bug me. Of course we can replace them as we change code 
> for some other reason, but hunting them does not seem worthwile to me 
> if there is no real incentive for it (e.g. a big performance boost 
> because a vector is used in a core spot where an array list would be 
> faster). How about profiling OJB after the 1.0 is out ?
> Also I have a somewhat uneasy feeling about declaring a variable with 
> one type and initializing it with another type when this is the only 
> type that the actual value will ever have. I personally prefer to be 
> as precise as possible about the (possible) types of a value. IMO we 
> should use the interfaces explicitly only for public or protected 
> features.
>
> Tom
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message