I have an application that needs to constantly (every 50ms), call to an MVC action, and pickup/drop off data.
I am using Linq to SQL and MVC because of how simple they are to implement, and I know that they aren't perfect when it comes to performance, but it works relatively well, but the best speed I can get with my current approach is 200ms (without requests overlapping).
Each call to the site will create a new instance of the datacontext, query/insert it and return that data.
Is there a way to have the datacontext static, but submitchanges say every 5 seconds, so that i am pretty much hitting an in-memory version of the data?
Edit:
I built a completely disconnected architecture that contains all the same properties and objects of my context, and I statically declare that object on application_start(), and on every X requests, a thread is spun to attach all the disconnected objects and store it to the database.
This has successfully reduced my round-trip time to only 100ms, a great improvement, but it is sill lacking from what it needs to be for "real-time"
I'm getting to the level of micro-optimization, but I can't seem to push it any faster.