• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Performance Improvement

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look at java.util.Timer
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
"Don't believe every tiny ad you see on the internet. But this one is rock solid." - George Washington
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic