mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-25 17:16:00 +03:00
[GH-ISSUE #1495] Bug: Sort By Size Not Working #880
Labels
No labels
expected: maybe someday
expected: next release
expected: release after next
expected: unlikely unless contributed
good first ticket
help wanted
pull-request
scope: all users
scope: windows users
size: easy
size: hard
size: medium
size: medium
status: backlog
status: blocked
status: done
status: idea-phase
status: needs followup
status: wip
status: wontfix
touches: API/CLI/Spec
touches: configuration
touches: data/schema/architecture
touches: dependencies/packaging
touches: docs
touches: js
touches: views/replayers/html/css
why: correctness
why: functionality
why: performance
why: security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ArchiveBox#880
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?
Originally created by @zero77 on GitHub (Aug 27, 2024).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1495
Describe the bug
Under snapshot when you click on size either once or twice it does not sort by size but does reorder the list of snapshots.
Steps to reproduce
Go to snapshot click on size either once or twice
Screenshots or log output
ArchiveBox version
v0.8.2
@pirate commented on GitHub (Aug 27, 2024):
That is correct, size is not stored in DB as it's an expensive filesystem calculation, it's computed on the fly and cached only for the snapshots currently visible on the page. When you sort by size it actually sorts by number of output results recorded, which is the closest approximation that's still reasonably fast.
If you really need to sort by size I suggest just sorting the data/archive/ dir in your filesystem browser or using a CLI tool like Ncdu (both of which you'll notice take several minutes to compute sizes for everything).
I will likely add size sorting in the UI back in the future as it's very useful, but I need to do some internal architecture improvements to support doing it performantly.
@zero77 commented on GitHub (Aug 28, 2024):
@pirate
Thank you for the explanation, the sizes are there already even if they are not completely accurate.
In the below example i have sorted by largest first but it didn't work:
@pirate commented on GitHub (Aug 28, 2024):
The displayed sizes are accurate but it's doing a trick where it only calculates them for the list page you're actively viewing (<100 snapshots at a time). The sorting needs to operate across all pages matching your active filters, so it cant be based on the displayed sizes in the current architecture (calculating the sizes of every single snapshot across all pages in order to sort correctly would take too long).