← Back to team overview

launchpad-dev team mailing list archive

Re: decoupling bugmessage and message in the schema

 

On Fri, Apr 8, 2011 at 2:33 AM, Jon Sackett
<jonathan.sackett@xxxxxxxxxxxxx> wrote:
> On 4/6/11 9:10 PM, Robert Collins wrote:
>> Are there any reasons we /shouldn't/ do this?
>
> The only reason I can think of is some standardization that's been done
> on using message visibility as we work towards spam control.
>
> But, that's not a strong reason against--I think we can get the same
> benefits code wise probably by creating a message mixin to share those
> basic bits that all comment/message systems should have.
>
> I would prefer to not refragment that work as I just spent some time
> shuffling things so that message visibility is controlled on message,
> but given the performance issue on bugs, I can accept that it may be
> necessary.

Fortunately these things are decoupled :) It should be possible to get
two objects out of the one table, to reflect our object model
separately from our serialisation form. If storm doesn't support this,
we'll need to figure out how to get it to, or layer it on top. Or use
a mix in, though I get twitchy with the number we have.

With Steve's help I did an experiment yesterday, which makes the
'commented on' query take 1/10th of the time it currently does, and
reduces the first-query case for ~janitor to 1.8 seconds : that was to
denormalise owner onto BugMessage (maintained via triggers). The
schema change for this is landed in db-devel now, and I'm going to put
a data migrator for it together to seed the initial data via the
garbo.

-Rob



References