0

I have a WCF named pipe service that receives a byte array and writes it into an SQLite DB. When I moved the SQLite insert logic into the WCF service the write performance decreased almost by half. I went through various recommendation online but nothing seems to help. My current configuration looks like this:

 pipeBinding.MaxBufferPoolSize = 5000000;
 pipeBinding.MaxBufferSize = 5000000;
 pipeBinding.MaxReceivedMessageSize = 5000000;
 pipeBinding.ReaderQuotas.MaxArrayLength = 5000000;
 pipeBinding.Security.Transport.ProtectionLevel = ProtectionLevel.None;             

More tweaking recommendations would be more than welcome.

Igliv
  • 214
  • 3
  • 16
  • Is your service `PerSession`? `PerCall`? Do you make repeated calls to the service using the same client proxy? Do you initiate a DB connection at the start of the service method? If so, consider making your service `PerSession` and move the DB connection init to your service constructor where it can be used across calls for a given proxy –  Apr 05 '16 at 04:15
  • 1
    It has a non default constructor so it can't be PerSession. I have configured behaviour.InstanceContextMode = InstanceContextMode.Single; It did help creating a single db instance. I'm also looking at writing my own serialization. Maybe skipping the base64 phase will help – Igliv Apr 05 '16 at 12:16

1 Answers1

-3

Using protobuf helped increasing the speed however most consuming action was a sum action on the SQLite table so I had change the structure of my db.

Igliv
  • 214
  • 3
  • 16