Introduce OFFLINE_INBOX_MANY_ENABLED flag for perf quickfix

Since offline inboxing and desktop were introduced, we went from testing with
~10 messages to ~1000 messages. This surfaced inefficiencies such as this issue.
It also means someone who joins a public channel such as #status will experience
significant lag when signing in. To remedy this, we put offline inboxing for
public/group chats under a flag until the underlying perf issue has been
resolved.
This commit is contained in:
Oskar Thoren 2018-01-08 17:18:58 +09:00
parent df96d6e826
commit 413f9c2fad
No known key found for this signature in database
GPG Key ID: 5128AB0637CD85AF
5 changed files with 6 additions and 1 deletions

1
.env
View File

@ -4,6 +4,7 @@ ETHEREUM_DEV_CLUSTER=1
MAINNET_NETWORKS_ENABLED=1 MAINNET_NETWORKS_ENABLED=1
ERC20_ENABLED=1 ERC20_ENABLED=1
OFFLINE_INBOX_ENABLED=1 OFFLINE_INBOX_ENABLED=1
OFFLINE_INBOX_MANY_ENABLED=1
LOG_LEVEL=debug LOG_LEVEL=debug
LOG_LEVEL_STATUS_GO=info LOG_LEVEL_STATUS_GO=info
JSC_ENABLED=1 JSC_ENABLED=1

View File

@ -4,6 +4,7 @@ ETHEREUM_DEV_CLUSTER=1
MAINNET_NETWORKS_ENABLED=1 MAINNET_NETWORKS_ENABLED=1
ERC20_ENABLED=1 ERC20_ENABLED=1
OFFLINE_INBOX_ENABLED=1 OFFLINE_INBOX_ENABLED=1
OFFLINE_INBOX_MANY_ENABLED=0
LOG_LEVEL=debug LOG_LEVEL=debug
LOG_LEVEL_STATUS_GO=info LOG_LEVEL_STATUS_GO=info
JSC_ENABLED=1 JSC_ENABLED=1

View File

@ -4,6 +4,7 @@ ETHEREUM_DEV_CLUSTER=0
MAINNET_NETWORKS_ENABLED=0 MAINNET_NETWORKS_ENABLED=0
ERC20_ENABLED=0 ERC20_ENABLED=0
OFFLINE_INBOX_ENABLED=0 OFFLINE_INBOX_ENABLED=0
OFFLINE_INBOX_MANY_ENABLED=0
LOG_LEVEL=info LOG_LEVEL=info
LOG_LEVEL_STATUS_GO=info LOG_LEVEL_STATUS_GO=info
JSC_ENABLED=0 JSC_ENABLED=0

View File

@ -137,7 +137,8 @@
(fn [key-id] (fn [key-id]
(f/add-filter! (f/add-filter!
web3 web3
(if config/offline-inbox-enabled? (if (and config/offline-inbox-enabled?
config/offline-inbox-many-enabled?)
{:topics [f/status-topic] {:topics [f/status-topic]
:key key-id :key key-id
:allowP2P true :allowP2P true

View File

@ -24,6 +24,7 @@
(def mainnet-networks-enabled? (enabled? (get-config :MAINNET_NETWORKS_ENABLED 0))) (def mainnet-networks-enabled? (enabled? (get-config :MAINNET_NETWORKS_ENABLED 0)))
(def erc20-enabled? (enabled? (get-config :ERC20_ENABLED 0))) (def erc20-enabled? (enabled? (get-config :ERC20_ENABLED 0)))
(def offline-inbox-enabled? (enabled? (get-config :OFFLINE_INBOX_ENABLED 0))) (def offline-inbox-enabled? (enabled? (get-config :OFFLINE_INBOX_ENABLED 0)))
(def offline-inbox-many-enabled? (enabled? (get-config :OFFLINE_INBOX_MANY_ENABLED 0)))
(def log-level (def log-level
(-> (get-config :LOG_LEVEL "error") (-> (get-config :LOG_LEVEL "error")
string/lower-case string/lower-case