[Grok-dev] Re: Keeping indexes up to date
faassen at startifact.com
Mon Aug 13 08:10:25 EDT 2007
On 8/12/07, Philipp von Weitershausen <philipp at weitershausen.de> wrote:
> On 12 Aug 2007, at 21:40 , Martijn Faassen wrote:
> > Alternatively you can safely entirely ignore the second argument to
> > the ObjectModifiedEvent.
> I disagree (see below and my other email for reasons).
> > I'm not sure whether the catalog indexing code actually makes use
> > of it but it certainly works without it.
> It works without it (it simply has to), but that doesn't mean the
> whole indexing story can't be made more efficient if we actually
> *had* this kind of information to go along with the event.
Nothing makes use of it in the indexing framework right now, so this
would be speculative coding.
> I don't see why you couldn't simply send along the information if you
> already know it. It's not like Luciano doesn't have this information
> at hand when he's sending the event. It also costs 1 more line of
> code (and an appropriate convenience helper may event cut down on
> that, in case you're worrying about that).
I was not discussing this particular case. In many cases this is going
to be fairly easy to accomplish. In other cases it's going to make the
developer think quite hard - importing the contents of an object from
XML may be an example. Any code that isn't form-driven is going to be
an example. We'd be asking people to think extra hard, write more
code, and so on, while it likely has *no* effect on their system
whatsoever. The catalog indeed *completely* ignores this information.
This is inviting people to do cargo-cult programming: "yeah, I put
this in as I saw it in other code and I have no idea why but it
More information about the Grok-dev