mirror of
https://github.com/urbit/shrub.git
synced 2024-12-12 18:48:14 +03:00
Merge pull request #640 from Fang-/talk-perf
Talk now only loads in messages from the last five days on first boot.
This commit is contained in:
commit
d1a201cf0f
@ -29,9 +29,10 @@
|
||||
|%
|
||||
++ state :> application state
|
||||
$: :: messaging state ::
|
||||
count/@ud :< (lent grams)
|
||||
grams/(list telegram) :< all history
|
||||
known/(map serial @ud) :< messages heard
|
||||
last/@ud :< last heard
|
||||
count/@ud :< (lent grams)
|
||||
sources/(set circle) :< our subscriptions
|
||||
:: circle details ::
|
||||
remotes/(map circle group) :< remote presences
|
||||
@ -226,7 +227,10 @@
|
||||
server
|
||||
::
|
||||
%+ welp /circle/[inbox]/grams/config/group
|
||||
?:(=(0 count) ~ [(scot %ud count) ~])
|
||||
?. =(0 count)
|
||||
[(scot %ud last) ~]
|
||||
=+ history-days=~d5
|
||||
[(scot %da (sub now.bol history-days)) ~]
|
||||
==
|
||||
::
|
||||
:> #
|
||||
@ -367,7 +371,7 @@
|
||||
~&([%unexpected-circle-rumor -.rum] +>)
|
||||
::
|
||||
$gram
|
||||
(ta-learn gam.nev.rum)
|
||||
(ta-open nev.rum)
|
||||
::
|
||||
$config
|
||||
=+ cur=(fall (~(get by mirrors) cir.rum) *config)
|
||||
@ -453,15 +457,16 @@
|
||||
::
|
||||
|= nes/(list envelope)
|
||||
^+ +>
|
||||
(ta-lesson (turn nes tail))
|
||||
?~ nes +>
|
||||
$(nes t.nes, +> (ta-open i.nes))
|
||||
::
|
||||
++ ta-lesson
|
||||
:> learn all telegrams in a list.
|
||||
++ ta-open
|
||||
:> learn message from an envelope.
|
||||
::
|
||||
|= gaz/(list telegram)
|
||||
|= nev/envelope
|
||||
^+ +>
|
||||
?~ gaz +>
|
||||
$(gaz t.gaz, +> (ta-learn i.gaz))
|
||||
=? last (gth num.nev last) num.nev
|
||||
(ta-learn gam.nev)
|
||||
::
|
||||
++ ta-learn
|
||||
:> save/update message
|
||||
@ -2458,7 +2463,7 @@
|
||||
==
|
||||
?: =(a 'reset')
|
||||
~& 'full reset incoming, hold on to your cli...'
|
||||
:_ +>(grams ~, known ~, count 0)
|
||||
:_ +>(grams ~, known ~, count 0, last 0)
|
||||
:~ [ost.bol %pull /server/client server ~]
|
||||
[ost.bol %pull /server/inbox server ~]
|
||||
peer-client
|
||||
|
Loading…
Reference in New Issue
Block a user