mirror of
https://github.com/go-shiori/shiori.git
synced 2026-04-25 06:25:54 +03:00
[PR #387] [MERGED] sqlite: remove unneeded LEFT JOIN to improve performance #581
Labels
No labels
component:backend
component:builds
component:builds
component:extension
component:frontend
component:readability
database
database:mysql
database:postgres
database:sqlite
feature:ebooks
github_actions
good first issue
hacktoberfest
note:duplicate?
note:fixed?
note:out-of-scope?
os:windows
priority:high
priority:low
pull-request
resolution:as-intended
resolution:cant-reproduce
resolution:duplicate
resolution:fixed
resolution:wontfix
tag:TBD
tag:big-task
tag:help-wanted
tag:huge-data
tag:meta
tag:more-info
tag:next
tag:no-stale
tag:requires-migrations
tag:research
tag:security 🛡️
tag:stale
tag:waiting-for-assignee
type:bug
type:documentation
type:enhancement
type:meta
type:ux
user:cli
user:web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shiori#581
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/go-shiori/shiori/pull/387
Author: @tungel
Created: 2/26/2022
Status: ✅ Merged
Merged: 3/10/2022
Merged by: @fmartingr
Base:
master← Head:master📝 Commits (3)
d1c6247sqlite: remove unneeded LEFT JOIN to improve performance01943faFix handling join clause in GetBookmarks6af589dRevert changes in GetBookmarks📊 Changes
1 file changed (+0 additions, -1 deletions)
View changed files
📝
internal/database/sqlite.go(+0 -1)📄 Description
I came across this project a few days ago on HackerNews and I like it very much. After using it a bit more during the last few days, I notice that the performance degrades quickly. With 1187 bookmarks (40 pages), running the shiori server (using sqlite db) on MacBook Pro (16-inch, 2019) 2.6 GHz 6-Core Intel Core i7 took around 10 seconds to load and similar amount of time to switch between pages.
I managed to track down the culprit - it's the
LEFT JOINstatements in theGetBookmarksandGetBookmarksCountmethods in thesqlite.gothat cause the slowness.I'm not very familiar with the code base yet but it looks like we don't need
LEFT JOINin those methods. Removing it helps improving performance dramatically.Before:
After
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.