M
M
Michael Vasyukov2017-11-09 21:01:27
Database
Michael Vasyukov, 2017-11-09 21:01:27

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);
            }

PS Thank you all!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Michael Vasyukov, 2017-11-12
@programmer_developer

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

B
bullock, 2018-01-23
@bullock

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 question

Ask a Question

731 491 924 answers to any question