Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Do IDEs use Reflection API  RSS feed

 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now a days we have many IDEs in market.For example Jedeveloper,IdeaJ etc..
They are very good to use.Do they use reflection APIs?Is this API so fast?
I doubt it.
 
Ranch Hand
Posts: 1071
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sure most modern IDE's use reflection for some things. reflection is slower than direct calls to known classes, but it is not so slow as to prohibit general use. There are many frameworks and libraries that use reflection to work.

Hibernate uses reflection extensivly, and I wouldn't say it is 'slow'. However in order to improve performance in some places I believe they have started doing some byte code manipulation.

I'm not sure if this is an IDE question or a reflection question or a general performance question.
 
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
afaik bcel was part of Hibernate for a long time, so I guess that reflection wasn't used too much.

as regards ides (presenting the java member trees for classes only) they may use reflection or bytecode inspection. i would probably go for the second option as some of the available toolkits are pretty fast and easy to use nowadays.

--
./pope
[the_mindstorm]
 
author
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With all of the bean introspection going on in the visual designers, I'd be floored if many of them weren't using core reflection to do that stuff.

Meanwhile, a good portion of my job is doing user interfaces and client-side infrastructure. I can tell you that from my experience, I've not had performance problems from reflection in that setting. Repeated applications of reflection in a tight loop or engine, of course, slows a program significantly, but a couple of usages under a button shouldn't hurt. Anytime you're working with a user, you have roughly 2-3 seconds before they wonder whether the program is broken...

My bottom line is that fast enough and flexible often beats screaming fast, especially in the UI world.

For more performance discussion, you can check out this other posting:

http://www.coderanch.com/t/272618/java/java/Dr-Forman-Objection-Creation-Java

Best Regards,

Nate
 
You ought to ventilate your mind and let the cobwebs out of it. Use this cup to catch the tiny ads:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!