[jdom-interest] a question about node type
Grzegorz Kaczor
grzegorz.kaczor at computaris.com
Thu Dec 7 02:00:58 PST 2006
Hi Tatu,
If /instanceof/ is efficient then the problem is much smaller. However,
I agree with you and when I see /instanceof/ in code it makes me somehow
anxious :).
Regards,
Grzegorz
Tatu Saloranta wrote:
> --- Syloke Soong <ssoong at protedyne.com> wrote:
>
>
>> [quote]
>> instanceof is reflection and reflection is slow :).
>> [/quote]
>>
>> Omg[osh], I've got instanceof operator all over the
>> place. Though it
>> seems my IO operations that are slowing my apps
>> down.
>>
>
> The original claim was pure BS. instanceof is a rather
> fast operation, requiring just simple lookups by JVM.
> The main problem with instanceof is not performance
> but that using it (or reliance on) is often sign of
> bad design.
>
> As to not having basic Node type, well, as far as I
> know that was a fundamental conscious decision by JDom
> authors, back in the day ("seemed like a good idea
> back then"). Other tree models do use such a base
> class or interface, so those who prefer such an
> approach could have a look at Dom4j or XOM.
>
> -+ Tatu +-
>
>
>
>
> ____________________________________________________________________________________
> Want to start your own business?
> Learn how on Yahoo! Small Business.
> http://smallbusiness.yahoo.com/r-index
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com
>
>
--
Grzegorz Kaczor
Computaris Poland
Mobile: +48660742724
grzegorz.kaczor at computaris.com
This email is subject to Computaris email terms of use: http://www.computaris.com/email_terms.html
More information about the jdom-interest
mailing list