• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Why is it faster?

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just a question that I was wondering about. I remember reading that Servlets have a speed advantage over JSP. Why is this the case, shouldn't it be about the same? What's causes JSP to load slower? Any answers would help, thanks.
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would believe they are faster for the first time acess comparision only. When a JSP is accessed the first time, unless it is pre-compiled, it takes time to be converted into a servlet. Then it is loaded.
I don't think there is a significant performance hit after that, although I must admit I have never stress tested them.
regds.
- madhav
 
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah i agree with madhav that since the first time a request is send to a jsp it is compiled to a servelet before processing the request, henchforth I don't see any reason why a servlet should be faster vis a vis a jsp...may be this could across various servers but faster...I doubt
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The extra steps that a servlet engine takes to set up a JSP servlet are tiny compared to normal processing times, so I doubt if you could detect a difference.
Bill
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
iam not sure where u read that servlets are faster than JSP's. i agree with others, jsp's are compiled the first time they are accessed, after that it should be the same.
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out this thread for more information on this topic.
 
I am Arthur, King of the Britons. And this is a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic