Answer the question
In order to leave comments, you need to log in
How to deal with slow file uploads in LiteDB?
Hello! I recently started working with the LiteDB file database, so far everything is fine, but there is one BUT =( uploaded an .mp4 file with a duration of 30 minutes and a weight of 130 MB for 2 minutes! This does not suit me at all. Please tell me, are there any options to download the file faster?
I upload files like this:
using (var db = new LiteDatabase(Auxiliary.pathDB))
{
db.FileStorage.Upload(idFile, pathFile);
}
Answer the question
In order to leave comments, you need to log in
I will store files larger than 10MB in a folder, and in the database only a link and a hash to this file. Since this database is not designed to store large files, because uploaded data is divided into 1MB blocks
I could be wrong, I ask the experts to correct me, as far as I know, reading and writing to the database is always slower than when interacting with the file system (with in-memory data caching, this may not be the case, but this is a rather wasteful way to use all the memory). Accessing files requires going through your application and the DB layer.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question