Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-427

MongoGridFS.Download() should allow skipping MD5 calculations

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.4.1
    • Affects Version/s: 1.4
    • Component/s: None
    • Labels:
      None

      I believe that MongoGridFS.Download() overloads should allow ignoring MD5 sum altogether (not hashing at all) for performance reasons. This, of course, should be an "opt-out" flag, with default still validating MD5 sums.
      A little backstory: while there is a GridFS module for nginx, we would prefer using .NET backend to nginx w/caching for now, since nginx-gridfs is a bit limited in functionality we require and is based off the MongoDB C driver that is very limited in functionality also, so we can't easily extend the module for our needs. It turned out that MD5 calculcations in .NET takes most of the CPU time for our GridFS "server", and we would not like to "hack" around the API or access collections directly to skip MD5 computations. To emphasize that this is not recommended, maybe the there should be another method instead of a flag, for example MongoGridFS.DownloadUnsafe().

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            onyxmaster Aristarkh Zagorodnikov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: