Code review comment for lp:~michael.nelson/launchpad/distro-series-difference-model

Revision history for this message
Robert Collins (lifeless) wrote :

@Michael regarding interfaces and model code; if our implementations
were substitutable *with* high performance, I'd totally support what
you're saying.

However, the reality is that object traversal is slow (because of lazy
loading); our model objects conflate database access with domain
knowledge, and these two things combined mean that:
 - you cannot replace Person in calls wanting IPerson with something
derived from Person and stored in another table: the whole structure
of model->storm relationships means that that will simply not work.
 - working solely via I* guarantees terrible performance and the
inability to drive the lower layers efficiently.

I would like to change this, as has been discussed on the list, but we
don't have a better pattern || code for it yet.

You should, of course, delegate, DRY and so forth, but Interface vs
Implementation as far as Launchpad Interfaces go is a weak story.

-Rob

« Back to merge proposal