Open Bug 258492 Opened 16 years ago Updated 11 years ago

Want to measure scrollback in minutes

Categories

(Other Applications :: ChatZilla, enhancement)

enhancement
Not set

Tracking

(Not tracked)

People

(Reporter: neil, Assigned: rginda)

References

Details

Having a scrollback in lines is very inflexible. #developers gets 36 times as
much traffic as #composer. 300 lines gets me 3 days in #composer but only 2
hours in #developers. I'd rather have scrollback deleted by time.

I would be happy if the scrollback grew without limit if the amount of traffic
peaked, so that the number of lines of scrollback was the peak number of lines
in any given (say) 24 hour period since the view was opened.
Product: Core → Other Applications
Going to require some engineering work to remember the timestamps nicely for
each line. It would be possible to do it in not-so-smart form thus:

  * Keep a list of "marked lines" for each view which is an array of <tr>
references and JavaScript Date timestamps.
  * Store the timestamp of the last marked line added on the view, defaulting to
0. (Actually, this is unnessessary - the timestamp of the newest entry to the
list will suffice, or 0 if there are no entries.)
  * When a new line is added (addHistory), and 5 or more minutes have passed
since the timestamp of the last added marked line, mark this new line and update
timestamp accordingly.
  * When it comes to removing a line from the top, check if it is the oldest
marked line. If it is, the line can only be removed if it is older than the "min
age" for the history; if the line is not old enough, the max line count for the
view is increased so it fits. Obviously, when the oldest marked line is removed,
it needs to be removed from the list attached to the view as well.

This lot would make each view's maxLines preference expand (if needed) to
acccomodate at least X minutes of history, though only using marked lines (max
of one per 5 minutes). It may be worth adjusting the frequency of the marked
lines according to the minimum history time required. The minimum history
required default will be 0 minutes, but we'll still need to mark the lines
sensibly in case they change it with a semi-entirely full view (which will
therefore need a marked line near the top to reduce the amount of lines lost
before the maxLines are expanded).

It may be worth setting a minimum history required time of something like 2
hours, rather than 0 minutes, to give this good use (rather than just have one
person use it!). 
Depends on: 489971
QA Contact: samuel → chatzilla
You need to log in before you can comment on or make changes to this bug.