forked from cory/tildefriends
core: sqlite checkpoint tweaks. Switch the periodic checkpoint to passive mode. Truncate mode was painful on mobile. I'm seeing it succeed often enough that we don't grow indefinitely. Also fix the print.
This commit is contained in:
@ -191,8 +191,15 @@ class TfElement extends LitElement {
|
||||
try {
|
||||
while (true) {
|
||||
let max_seen;
|
||||
for (let account_chunk = 0; account_chunk < ids.length; account_chunk += k_account_chunk_size) {
|
||||
let ids_chunk = ids.slice(account_chunk, account_chunk + k_account_chunk_size);
|
||||
for (
|
||||
let account_chunk = 0;
|
||||
account_chunk < ids.length;
|
||||
account_chunk += k_account_chunk_size
|
||||
) {
|
||||
let ids_chunk = ids.slice(
|
||||
account_chunk,
|
||||
account_chunk + k_account_chunk_size
|
||||
);
|
||||
let abouts = await tfrpc.rpc.query(
|
||||
`
|
||||
WITH
|
||||
@ -464,16 +471,18 @@ class TfElement extends LitElement {
|
||||
}
|
||||
|
||||
async load_recent_reactions() {
|
||||
this.recent_reactions = (await tfrpc.rpc.query(
|
||||
`
|
||||
this.recent_reactions = (
|
||||
await tfrpc.rpc.query(
|
||||
`
|
||||
SELECT DISTINCT content ->> '$.vote.expression' AS value
|
||||
FROM messages
|
||||
WHERE author = ? AND
|
||||
content ->> '$.type' = 'vote'
|
||||
ORDER BY timestamp DESC LIMIT 10
|
||||
`,
|
||||
[this.whoami]
|
||||
)).map((x) => x.value);
|
||||
[this.whoami]
|
||||
)
|
||||
).map((x) => x.value);
|
||||
}
|
||||
|
||||
async load() {
|
||||
|
@ -234,9 +234,9 @@
|
||||
<div class="w3-container w3-padding-64 w3-light-grey w3-center">
|
||||
<h1 class="w3-jumbo"><b>Built the Old Fashioned Way</b></h1>
|
||||
<p>
|
||||
Tilde Friends strives to use only simple and widely adopted
|
||||
dependencies in order to keep it easy to build for all sorts of
|
||||
platforms and maintainable for a very long time.
|
||||
Tilde Friends strives to use only simple and widely adopted dependencies
|
||||
in order to keep it easy to build for all sorts of platforms and
|
||||
maintainable for a very long time.
|
||||
</p>
|
||||
<p>
|
||||
Though of course for building Tilde Friends apps, you are free to use
|
||||
|
Reference in New Issue
Block a user