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 600007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:33:36+00:00 2026-05-13T16:33:36+00:00

We are developing desktop application in vs2008 with winforms and sql server 2008.At present,

  • 0

We are developing desktop application in vs2008 with winforms and sql server 2008.At present, we make lot of dbase calls(linq to sql) on form load, so this make the application real slow.One option is to load all the data required at the start of application load, and store it in a cache(just static collections).What other options we should look at? Are there any available guidelines available online?

thanks

  • 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-13T16:33:37+00:00Added an answer on May 13, 2026 at 4:33 pm

    Several answers here seem to be heavy on assumption and gloss over the most important point:

    • Before you can usefully optimize anything, you need to find out what is slowing it down.

    Use a profiler. A good free one is EQATEC. Or if it’s really, really slow, just step through the program. Also use the SQL Server Profiler to see what’s going on with the queries themselves.

    The problem may not be one of caching at all. It may be a poorly-optimized database. It may be a slow network connection. It may even be something totally unrelated in your code. There’s no way to know for sure unless you check.

    Having said that, if the problem really is simply having “too many” database calls, there are a few approaches you can take that won’t cause a major spike in the application’s load time:

    • Cache data the first time it is used;

    • Switch to using Stored Procedures that return multiple result sets (using IMultipleResult – example here). This requires only one round trip for several sets of data. Or, if you can, combine the results into one query/result, if the data that you are currently querying separately can all be JOINed together.

    • Perform your data-access operations in a background thread (i.e. using BackgroundWorker). Often the problem isn’t really the actual speed, just the fact that you block the UI while it’s happening.

    • Start your application right away without pre-loading any data, but immediately start pre-loading in a background thread. Add some synchronization code so that if the user does something that requires the data before it’s fully loaded, it will wait for the preloader to finish.

    • Use an abstraction layer, such as a WebService, that “lives” very close to the database server and isn’t hurt by a large number of round trips. This can then supply all the data relevant to a single UI screen/form.

    All of these are complex options that may require a major overhaul to the application architecture. Your life will be much easier if you can simply optimize a few queries with indexes, or combine multiple queries into one. First try to find out why – and I mean specifically why the application is slow; then and only then should you be seriously considering any of the above options.

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

Sidebar

Ask A Question

Stats

  • Questions 369k
  • Answers 369k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You might be able to do this with a CAGradientLayer… May 14, 2026 at 6:18 pm
  • Editorial Team
    Editorial Team added an answer Huh. Looks like dragging the bookmarklet in text form is… May 14, 2026 at 6:18 pm
  • Editorial Team
    Editorial Team added an answer This is called a bug. I found a similar one… May 14, 2026 at 6:18 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.