-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(server): faster folder responses #12214
Conversation
If you want to update the folders instantly, do we have a job to do that? |
It doesn't handle updates that change |
This seems to add a lot of edge case handling in the frontend. Can we simplify it by handling more of them server-side? |
We can remove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then why do we have this logic here?
Do you mind moving the vacuum logic into a separate pull request? |
96d3e04
to
015298e
Compare
add clarifying comment
update asset mock update nightly test exclude archived assets update sql remove vacuuming logic keep varchar type for filename set not null
formatting
fix typing simplify type
537b638
to
cfeec70
Compare
Lots of conflicts, so closing for now. If you get around to working on this in the future we can always revisit it. |
Description
asset_folders
table (many assets to one folder) containing unique parent folders. This ends up being much faster than indexing the mainassets
table for our access patterns when the library is large.asset_folder
'spath
andassets
'soriginalFileName
, treating numbers as numbers (1, 2, 10 instead of 1, 10, 2)/upload
andupload
are not the same)/
and make path manipulation more ergonomicoriginalPath
should ideally be removed to have a single source of truth for the file path and make rows narrower in the assets table. However, in the interest of making downgrading possible and giving us more options to fix any possible bugs, I think it's better to keep it in the short-term.How Has This Been Tested?
Tested with a large instance containing an external library, storage template assets and a few corrupt images in the upload folder. They all display in the folder sidebar, and navigating each is instant (numbers are response times from the server):
Folders and files are in natural sorted order as expected.
The tag page is unchanged.
In draft, pending handling updates to
originalPath
and adding E2E tests.