Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 824373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:05:33+00:00 2026-05-15T03:05:33+00:00

I have an application that needs to constantly (every 50ms), call to an MVC

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T03:05:34+00:00Added an answer on May 15, 2026 at 3:05 am

    DataContext is meant to be created each time you go to the database. That shouldn’t be a bottleneck.

    If you’re concerned about expensive creation of database connections, that might not be a problem. There is a small connection poll so the connections are reused by subsequent calls.

    What you can do to improve performance (I haven’t heard a word it is poor right now) is to replace the auto-generated SQL with stored procedures. You will save a little bit on recreation of an execution plan.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that needs to check a website feed every second. Sometimes
We have an application that needs to know the path that it is executed
I have an application that needs to send a moderately high volume of messages
I have an application that needs to hit the ActiveDirectory to get user permission/roles
I have an application that needs to poll a webservice to see if the
we have an application that needs to send out various different types of template
I have an application that needs to work with a vendor-supplied API to do
I have an application that needs to highlight individual pixels on an image. I
I have an application that needs to determine whether a user has made a
I have an application that needs branding when downloaded in certain continents. When installed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.