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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:04:41+00:00 2026-06-14T03:04:41+00:00

Inside my web service, I open a filestream to a file on local disk.

  • 0

Inside my web service, I open a filestream to a file on local disk. I keep this around for the lifetime of the service. For every query that comes in, I use the filestream to read the disk.
I do this to avoid having to reopen the filestream on every query. Latency of this path is critical (should less than few ms). I use SSD to keep disk IO time to 0.1ms or less.

Can the filestream ‘go bad’ (become invalid) over long periods of time (days). Is it safer to just reopen the filestream on every query? If I have to reopen, what’s the overhead of constantly reopening a filestream several times a second?

  • 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-06-14T03:04:42+00:00Added an answer on June 14, 2026 at 3:04 am

    It is safe to keep files open as long as you need.

    Is it good for your case or not – you need to decide yourself. Re-opening file should not be slow (even on regular drive), but you need to try and measure yourself as no one but you know your exact performance goals.

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

Sidebar

Related Questions

I want to run function inside web service (.asmx file) $.ajax({ type: POST, contentType:
I am developing a Web Service solution that is hosted inside a JBoss 4.2.3
I have a soap web service with method: string startReaction(object reaction); Inside that method
Purpose of this web service is to server html/javascript/css/binary data inside simple XML document
I am getting response from web service in xml format and data are inside
I have created a SharePoint web part and inside this web part I am
I'm trying to use depedency resolver inside a Web Api method. This worked fine
I'm using Session variables inside a web service to maintain state between successive method
I have a web service that runs perfectly when i reference it from within
I have a simple web service which is hosted inside a console application. It

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.