Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Performance Improvement  RSS feed

 
Rajendar_reddy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all,
i am working on a performance Improve,
we are storeing date in session in specific search results, but it is going to up more than 2MB,
now we want remove unnessery date from session,
for that we have design like,
we have to create side process it will run every 10min,and it will check if the user is not accessing session data from last 15min so we have to remove from session.

what i want is how to create this side process,
if any body knows implementaion pl reply me.

Thanks in Advance
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at java.util.Timer
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, when you store the date in your session - are you using java.util.Date? A long? A String? A Calendar of some sort? Calendar is probably the worst in terms of unnecessary memory usage for a date. I'd recommend using a Date or a long. If it tuns out you need to store the date at all...
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean that you are ending up with 2meg of session data per session, or total across all the sessions? If the former, that sounds like too much data is getting serialized into the session instead of being stored elsewhere - and if you are running clustered, then 2meg/session is definitely going to grind your app into the dust. If you mean 2meg total across your expected number of simultaneous sessions, that doesn't sound like a big deal - less than a dollar's worth of hardware.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!