mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2026-03-19 02:41:36 +00:00
11x speed up of subscription page generation
My 30 subscriptions now take 25 ms to generate, instead of around 280. Around 120 ms were saved by creating a database index. Around 120 ms were saved by pre-compiling the pug template for video description timestamps. The other changes in this commit produced slight improvements.
This commit is contained in:
parent
0aa0505009
commit
55065e2a9e
4 changed files with 15 additions and 9 deletions
|
|
@ -58,6 +58,11 @@ const deltas = [
|
|||
function() {
|
||||
db.prepare("ALTER TABLE Subscriptions ADD COLUMN channel_missing INTEGER DEFAULT 0")
|
||||
.run()
|
||||
},
|
||||
// 9: add index Videos (authorID)
|
||||
function() {
|
||||
db.prepare("CREATE INDEX Videos_authorID ON Videos (authorID)")
|
||||
.run()
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue