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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:21:49+00:00 2026-06-16T16:21:49+00:00

I am looking to improve a WCF Client/Server so that it will deal with

  • 0

I am looking to improve a WCF Client/Server so that it will deal with large numbers of small files, faster than it currently does.

I have written a WCF client and a server to move files across a network.

I have it working by making a call from the client to the server (sending the name of a file that I want to download as a parameter), and then having the server returning a Stream

Simplified Example:

//CLIENT CODE>>
Stream stream = syncService.GetStream(fileName);
//<<CLIENT CODE

//SERVER CODE>>
public Stream GetStream(string fileName)
{
   string filePathOnServer = ServerService.Service1.SERVER_FILES_PATH + fileName;
   return File.OpenRead(filePathOnServer);
}
//<<SERVER CODE

I then call GetStream recursively if I need to get several files, and save the streams to Files on the Client machine.
It works acceptably when moving small numbers of large files
The issue I have is, the overhead of downloading a single file is about 1/10 of a second, regardless of size; so if I want to download a huge number of 1Kb files, I am essentially capped to a maximum of 10Kbs.

I am hoping that someone has a suggestion for an alternate implementation.
I have tried returning a List of Streams from the Server, but I gather that WCF won’t allow this.

I need to be able to do this without zipping the files.

I was considering trying to return one stream that was made up of several streams concatenated, but I’m unsure if there is a better approach.

  • 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-16T16:21:51+00:00Added an answer on June 16, 2026 at 4:21 pm

    I’d change your WCF method to accept a collection of file names(i.e. List<string> or string[]) , then pack them up. I know SharpZipLib works well in producing ZIP files.

    You stream the ZIP file back to the client, which would in turn unpack it and process the files.

    One bigger file should be orders of magnitude faster to transfer and lighter on the bandwidth (because you’d deal with less network-related overhead), not to mention the fact that you would have a single WCF invocation rather than one-per-file (a huge bottleneck).

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

Sidebar

Related Questions

Looking to improve quality of a fairly large Python project. I am happy with
We currently have a nicely relational sql server 2008 database that is our master
I'm looking for any way that I can improve the selector performance of a
I am looking to improve gps tracking for an app that i inherited. We
I'm looking for some tools to improve my Delphi development. And a tool that
I'm looking to improve this query I wrote for a small web application in
I'm looking for resources (ideally a book) that will help me gain an in-depth
I'm currently looking for ways to improve the productivity of our team. I've read
I'm trying to improve my coding ninja h4x skills, and I'm currently looking at
I've been looking to improve my programming habits and I heard that OO is

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.