Decrease queries delay in MessageDb, DialogDb and SQLite key-value.
GitOrigin-RevId: 5859c8ed99af5ac20b1485187c35faa85eff4201
This commit is contained in:
parent
586a812016
commit
470e5cec90
@ -356,7 +356,7 @@ class DialogDbAsync : public DialogDbAsyncInterface {
|
||||
DialogDbSyncInterface *sync_db_ = nullptr;
|
||||
|
||||
static constexpr size_t MAX_PENDING_QUERIES_COUNT{50};
|
||||
static constexpr double MAX_PENDING_QUERIES_DELAY{1};
|
||||
static constexpr double MAX_PENDING_QUERIES_DELAY{0.01};
|
||||
vector<Promise<>> pending_writes_;
|
||||
double wakeup_at_ = 0;
|
||||
template <class F>
|
||||
|
@ -1027,7 +1027,7 @@ class MessagesDbAsync : public MessagesDbAsyncInterface {
|
||||
MessagesDbSyncInterface *sync_db_ = nullptr;
|
||||
|
||||
static constexpr size_t MAX_PENDING_QUERIES_COUNT{50};
|
||||
static constexpr double MAX_PENDING_QUERIES_DELAY{1};
|
||||
static constexpr double MAX_PENDING_QUERIES_DELAY{0.01};
|
||||
std::vector<Promise<>> pending_writes_;
|
||||
double wakeup_at_ = 0;
|
||||
template <class F>
|
||||
|
@ -87,7 +87,7 @@ class SqliteKeyValueAsync : public SqliteKeyValueAsyncInterface {
|
||||
std::shared_ptr<SqliteKeyValueSafe> kv_safe_;
|
||||
SqliteKeyValue *kv_ = nullptr;
|
||||
|
||||
static constexpr double MAX_PENDING_QUERIES_DELAY = 1;
|
||||
static constexpr double MAX_PENDING_QUERIES_DELAY = 0.01;
|
||||
static constexpr size_t MAX_PENDING_QUERIES_COUNT = 100;
|
||||
std::unordered_map<string, optional<string>> buffer_;
|
||||
std::vector<Promise<>> buffer_promises_;
|
||||
|
Loading…
Reference in New Issue
Block a user