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.
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled

This commit is contained in:
2025-05-07 18:15:33 -04:00
parent 99a195a3fd
commit 4de53b9926
4 changed files with 22 additions and 17 deletions

View File

@ -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() {