views:

63

answers:

1

I'm creating an app that will have a fair amount of users. Everytime someone views a page or performs an activity I will be writing to a log. While I'm concerned about the performance of that in itself, my bigger concern is that I'm actually wanting to store that history in-session within the ASP.NET MVC application so that when they logout, I can display an audit trail of their activity to them. To do this, I simply create an Audit object and insert it using LINQ to SQL. I then take that same object and store it in a session LIST. I do this because technically the same user could be logged in from multiple locations so just hitting the database at the end wouldn't solve it. I also know I could key the audit on the session ID, but in the big picture I don't want to overburden the database.

My question: are there any performance issues with storing DBML generated objects in the session in ASP.MVC?

+1  A: 

This entirely depends on how big these objects are. How many KB per user are we talking about? But best guess... if it's just simple, reasonably short log data... the answer is no, you won't have a problem. You're going to run into other system bottlenecks long before you are serving enough users for this to be an issue.

Bryan