• 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
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Improving application Performace

 
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need some help in order to choose the best approach for the performace of my website.
Currently we display menus and its corressponding sub-menus on the Page.Logic which we have implemented right now is: whenever user clicks on the main menu, we go to the Database and retrieves its corresponding sub-menus. This is done for each click on the the main menu or parent menu.Now, I would love to know what would be the better approach, per the performance is concerned, keep doing the same thing or bring the entire menu and its submenu when user logs in and place it in session scope.

Thnx
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you think yourself... ?

Ofcourse it will be faster if you just get it from the database once and cache it in memory.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can even cache just the drop-down using oscache
 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sahil Sharma,
As per my knowledge the good design is to maintain our application with limited no.of connection objects,to maintain the connection object on the heap is very expensive right ?
As per your application the intaraction with the database is more it improves the network traffic,it's consumes one connection per each time to intaract wiht the database.
My suggetion is reduse the contacts wiht the database that give you good efficiency on your application.
Regards,
G Sirish Reddy.,
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Performance forum...
 
I've got no option but to sell you all for scientific experiments. Or a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!