← Back to team overview

launchpad-dev team mailing list archive

bug message indices. stable allocation and hidden messages

 

So, one of our deeper problems is that BugTask:+index has to load
-every- bug message to be able to show any bug message, because we
need to know the index of the message in the page.

There are a few subtleties around this and I'd like it if folk with
either strong UI opinions or knowledge of gotchas in the bugs code
could comment on the proposed changes below.

To fix this we need to denormalise the index and instead of
calculating it on the fly, use it as something we can query on.

Beyond that we have a choice:
 - we can keep the current rules for message index - that is that
hidden messages lose their index, and that bug syncing can change the
timeline and make messages appear in the past
 - we can change the rules, so that message indices become stable -
once allocated never changed.

I've chatted with Deryck in the past and we concluded that the second
option is ok UI wise (indeed, its preferrable). Code and performance
wise the second option is a clear winner because we don't have to
rewrite indices that have been allocated. We *may* need to make some
UI changes as a result of not having a consecutive series - but I
don't think so because we already support showing first + last N,
which is effectively the same.

Does anyone see an issue with us making bug message index allocation write-once?

Separately, there is an open question about how to allocate the
indices when there are already hidden messages; I propose to be very
simple and just do date first->last.

If noone comments I should have a patch up allocating this stuff tomorrow.

-Rob



Follow ups