aspose file tools*
The moose likes Struts and the fly likes Struts performance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts performance" Watch "Struts performance" New topic
Author

Struts performance

Louis - Jean Morisset
Greenhorn

Joined: Aug 25, 2003
Posts: 20
I really have two questions!
1- If you have a strut-config.xml that is lets say 4000 actions tags.(just for the sake of discussion) and that you only use 1000 of those actions tags. (Reason for only using 1000 is because of a merge in old an new project bla bla bla). So now, when we start the application, the Struts framework parses the struts-config.xml into classes, I suppose?? and loads it into memory. Right?? And the fact that you only use 1/4 of the action tags, the 3/4 that are loaded for nothing, will it impact performances??? And how dramatically will it impact performances if it does???
2- I was told that Java introspection was not very performant. I was very supprised to hear that, but I dought my source. So I thought I would ask here. I'm sure that Java introspection for javaBeans loading either in plain java or Struts is finelly tuned, right ??

Thanks
Louis Morisset (pardon my English...)
Rick Hightower
Author
Ranch Hand

Joined: Feb 20, 2002
Posts: 350
action mappings get put into a hash map. 4000 items in a hashmap is not a major drain on performance.
reflection is pretty fast since JDK1.3. if i remember correctly it use to be 20x slower to invoke a method reflection than to invoke directly. since JDK1.3 it is only twice as slow. i guess that equates to 2 nano seconds vs. 1 nano second... not too much to worry about. if you are worried, write a test using JUnitPerf. call a method on the same object a few billion times using reflection and then directly... see which one is faster. in truth, it is dust on the scale compared to other things you could do to improve performance in a web app (data caching, page caching, etc.).


Rick Hightower is CTO of Mammatus which focuses on Cloud Computing, EC2, etc. Rick is invovled in Java CDI and Java EE as well. linkedin,twitter,blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts performance
 
Similar Threads
Some question about JSF from a JSF newbiew.
Using Struts 1 with Prototype
Is EL practical?
How to use, struts 1-- struts-config.xml and struts 2 -- struts.xml together?
Questions about Exception handling