This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cause of an application running slow in java ?.

 
Praveen Kumar
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchies,

Recently I faced one interview question " Suppose if the application performance is slow, how you will troubleshoot and what things you will trouble shoot first".


I replied with DB normalization and JVM. I told we can some tools like Jprofile and Jmeter

Please let me know how we will troubleshoot and what are the available tools to do that one.


Thanks
Praveen
 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12097
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you should always use a profiler first. It will tell you where you application is really slow, letting you focus on what is really needed.
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I asked this question I would want to hear the candidate answer it in a scientific well thought out manner. If they quickly said all the things they would change about their code without properly emphasizing their knowledge of profiling, and an understanding that premature optimization is a sin, then in my view they have failed the question.

Profiling the code is the first step. I would elaborate on how you would do this (for example what tools and approach you would use to prove that you have done it before). I would then add doing any steps like DB normalization is premature, until you have found your bottlenecks, and explain why. You should tune where the profiling leads you. Having made it clear you just don't start tuning without evidence, you could then add typical performance improvement areas. IO subsystems such as the database, file, network are typically prime candidates for performance problems. You could add some examples of how you could detect and improve each of these. An example of a database check that can help a lot is to ensure that your tables have the proper indexes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic