mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-02 05:02:24 -06:00
fill in more code comments
This commit is contained in:
parent
ba3ddd32f9
commit
f62cc52761
4 changed files with 23 additions and 13 deletions
19
internal/cache/timeline/status.go
vendored
19
internal/cache/timeline/status.go
vendored
|
|
@ -243,7 +243,8 @@ func (t *StatusTimelines) ClearAll() {
|
|||
// StatusTimeline ...
|
||||
type StatusTimeline struct {
|
||||
|
||||
// underlying cache of *StatusMeta{}, primary-keyed by ID string.
|
||||
// underlying timeline cache of *StatusMeta{},
|
||||
// primary-keyed by ID, with extra indices below.
|
||||
cache structr.Timeline[*StatusMeta, string]
|
||||
|
||||
// fast-access cache indices.
|
||||
|
|
@ -263,12 +264,11 @@ type StatusTimeline struct {
|
|||
|
||||
// defines the 'maximum' count of
|
||||
// entries in the timeline that we
|
||||
// apply our Trim() operation
|
||||
// threshold to. the timeline itself
|
||||
// does not limit items due to absurd
|
||||
// complexities it would introduce,
|
||||
// so we we apply a 'cut-off' via
|
||||
// regular calls to Trim(threshold).
|
||||
// apply our Trim() call threshold
|
||||
// to. the timeline itself does not
|
||||
// limit items due to complexities
|
||||
// it would introduce, so we apply
|
||||
// a 'cut-off' at regular intervals.
|
||||
max int
|
||||
}
|
||||
|
||||
|
|
@ -363,6 +363,11 @@ func (t *StatusTimeline) Load(
|
|||
panic("nil load page func")
|
||||
}
|
||||
|
||||
// TODO: there's quite a few opportunities for
|
||||
// optimization here, with a lot of frequently
|
||||
// used slices of the same types. depending on
|
||||
// profiles it may be advantageous to pool some.
|
||||
|
||||
// Get paging details.
|
||||
lo := page.Min.Value
|
||||
hi := page.Max.Value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue