Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Performance issues with Servlets / JSP  RSS feed

 
Bageshwar Pratap Narain
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am working on a project using J2EE.
I know that, in near future my project would grow to some 500-600 jsp pages.
since all these jsp pages would be converted to servlets by the container,
will their be issues with performance ???
I mean hosting 500 servlets on a server with all their inits(), and contexts in memory !!!

will this compell me to reuse servlets but increases complications manifold

awaiting a response.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Larger and more active sites require more memory and better hard drives, nothing specific to Java here, its true for all technologies.

Monitor memory use and other performance figures as your site grows.

I suspect that if anything strains your system it will be data structures related to users rather than memory used by servlet classes.

Bill

 
Bageshwar Pratap Narain
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks bill , but you said..

nothing specific to Java here



what if i use PHP, since that is not precompiled, and thus, performance issue will only arise due to
increased traffic, and not the number of php pages present in the project..
are their some alternatives in java, where i can do things dynamically without the servlet ??
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66143
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you so sure that the count of servlets will be an issue? Have you profiled the site?



Or are you tilting at windmills?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bageshwar Pratap Narain wrote:what if i use PHP, since that is not precompiled, and thus, performance issue will only arise due to increased traffic, and not the number of php pages present in the project..

On the other hand, performance may be worse with PHP, since that is interpreted, and not compiled like servlets.

Take William's and Bear's advice: perform monitoring and profiling. It's the only way to make educated decisions instead of guesses.
 
Bageshwar Pratap Narain
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Why are you so sure that the count of servlets will be an issue? Have you profiled the site?



Or are you tilting at windmills?


I think i am rather tilting at windmills !!!
I d profile the site first
Thanks for the suggestions.
 
Vadim Vararu
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ha-ha! It's not a big deal. Just 500 more HttpServlet object. It's not a problem!!!
Problem may occur not because of 500 or 1000 objects. They may occur because of memory leaks or bad application architecture!
Don't worry about initialization or compilation. I guess you know about the on-load jsp compilation....


P.S. It's proved that servlet technology runs faster than, let's say, php or other server scripting technologies.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!